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
Mostrar archivo Open project: icicleio/concurrent

Public Methods

Method 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 method

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

count() public method

Gets the number of currently available locks.
public count ( ) : integer
return integer The number of available locks.

getSize() public method

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