PHP Class Icicle\Concurrent\Sync\Lock

This object is not thread-safe; after acquiring a lock from a mutex or semaphore, the lock should reside in the same thread or process until it is released.
Mostrar archivo Open project: icicleio/concurrent

Public Methods

Method Description
__construct ( callable $releaser ) Creates a new lock permit object.
__destruct ( ) Releases the lock when there are no more references to it.
isReleased ( ) : boolean Checks if the lock has already been released.
release ( ) Releases the lock.

Method Details

__construct() public method

Creates a new lock permit object.
public __construct ( callable $releaser )
$releaser callable

__destruct() public method

Releases the lock when there are no more references to it.
public __destruct ( )

isReleased() public method

Checks if the lock has already been released.
public isReleased ( ) : boolean
return boolean True if the lock has already been released, otherwise false.

release() public method

Releases the lock.
public release ( )