PHP Class VersionPress\Utils\Mutex

显示文件 Open project: versionpress/versionpress Class Usage Examples

Public Methods

Method Description
__construct ( $dir, $name, $timeout = 60 )
__destruct ( )
lock ( ) Locks the mutex. The lock is automatically released after $timeout.
release ( ) : boolean Releases the lock. Returns false on failure.

Private Methods

Method Description
getLockName ( )

Method Details

__construct() public method

public __construct ( $dir, $name, $timeout = 60 )

__destruct() public method

public __destruct ( )

lock() public method

Locks the mutex. The lock is automatically released after $timeout.
public lock ( )

release() public method

Releases the lock. Returns false on failure.
public release ( ) : boolean
return boolean