SyncMutex::lock
Waits for an exclusive lock
&reftitle.description;
public boolSyncMutex::lock
intwait-1
Obtains an exclusive lock on a SyncMutex object.
If the lock is already acquired, then this increments an internal counter.
&reftitle.parameters;
wait
The number of milliseconds to wait for the exclusive lock.
A value of -1 is infinite.
&reftitle.returnvalues;
&return.success;
&reftitle.examples;
SyncMutex::lock example
lock(3000))
{
echo "Unable to lock mutex.";
exit();
}
/* ... */
$mutex->unlock();
?>
]]>
&reftitle.seealso;
SyncMutex::unlock