SyncMutex::__construct
Constructs a new SyncMutex object
&reftitle.description;
public SyncMutex::__construct
stringname
Constructs a named or unnamed countable mutex.
&reftitle.parameters;
name
The name of the mutex if this is a named mutex object.
If the name already exists, it must be able to be opened by the current user
that the process is running as or an exception will be thrown with a meaningless
error message.
&reftitle.returnvalues;
The new SyncMutex object. An exception is thrown if the mutex cannot be
created or opened.
&reftitle.examples;
SyncMutex::__construct named mutex with lock timeout example
lock(3000))
{
echo "Unable to lock mutex.";
exit();
}
/* ... */
$mutex->unlock();
?>
]]>
SyncMutex::__construct unnamed mutex example
lock();
/* ... */
$mutex->unlock();
?>
]]>
&reftitle.seealso;
SyncMutex::lock
SyncMutex::unlock