(PECL sync >= 1.0.0)
SyncSemaphore::lock — Decreases the count of the semaphore or waits
public SyncSemaphore::lock ([ int $wait = -1 ] ) : bool
Decreases the count of a SyncSemaphore object or waits until the semaphore becomes non-zero.
wait
The number of milliseconds to wait for the semaphore. A value of -1 is infinite.
A boolean of TRUE if the lock operation was successful, FALSE otherwise.
© 1997–2020 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/syncsemaphore.lock.php