SyncSemaphore::lock Decreases the count of the semaphore or waits &reftitle.description; public boolSyncSemaphore::lock intwait-1 Decreases the count of a SyncSemaphore object or waits until the semaphore becomes non-zero. &reftitle.parameters; wait The number of milliseconds to wait for the semaphore. A value of -1 is infinite. &reftitle.returnvalues; &return.success; &reftitle.examples; <function>SyncSemaphore::lock</function> example lock(3000)) { echo "Unable to lock semaphore."; exit(); } /* ... */ $semaphore->unlock(); ?> ]]> &reftitle.seealso; SyncSemaphore::unlock