PHP Interface Icicle\Concurrent\Sync\Semaphore

Objects that implement this interface should guarantee that all operations are atomic. Implementations do not have to guarantee that acquiring a lock is first-come, first serve.
Inheritance: extends Countable
Afficher le fichier Open project: icicleio/concurrent

Méthodes publiques

Méthode Description
acquire ( ) : Generator
count ( ) : integer Gets the number of currently available locks.
getSize ( ) : integer Gets the total number of locks on the semaphore (not the number of available locks).

Method Details

acquire() public méthode

public acquire ( ) : Generator
Résultat Generator Resolves with a lock object when the acquire is successful.

count() public méthode

Gets the number of currently available locks.
public count ( ) : integer
Résultat integer The number of available locks.

getSize() public méthode

Gets the total number of locks on the semaphore (not the number of available locks).
public getSize ( ) : integer
Résultat integer The total number of locks.