MutexInterface
in
A locking mechanism.
Table of Contents
Methods
Methods
acquire()
Acquire the lock.
public
acquire([float $timeout = 0 ]) : bool
Return true if the lock is acquired, false if it is already held.
If the timeout is zero, the method always returns immediately regardless if the lock is acquired or not.
Given a positive timeout, the method will wait for the previous lock to release before acquiring or giving up.
Parameters
- $timeout : float = 0
-
in seconds
Return values
boolrelease()
Release the lock.
public
release() : bool
Returns true on success, false if the lock is already released.