PHP - Mutex::unlock() Function
Mutex::unlock() function can release the Mutex.
Syntax
final public static boolean Mutex::unlock( long $mutex [, boolean $destroy ] )
Mutex:: unlock() function can attempt to unlock the Mutex for a caller, optionally destroying the Mutex handle. The calling thread should own the Mutex at the time of a call.
Mutex:: unlock() function can return a boolean indication of success.
Example
<?php $mutex = Mutex::create(); var_dump(Mutex::lock($mutex)); var_dump(Mutex::unlock($mutex)); Mutex::destroy($mutex); ?>
php_function_reference.htm
Advertisements