PHP Класс Icicle\Concurrent\Threading\Semaphore
This is an implementation of a thread-safe semaphore that has non-blocking
acquire methods. There is a small tradeoff for asynchronous semaphores; you
may not acquire a lock immediately when one is available and there may be a
small delay. However, the small delay will not block the thread.
Показать файл
Открыть проект
Открытые методы
Приватные методы
Метод |
Описание |
|
init ( integer $locks ) |
Initializes the semaphore with a given number of locks. |
|
Описание методов
__clone()
публичный Метод
Clones the semaphore, creating a new instance with the same number of locks, all available.
__construct()
публичный Метод
Creates a new semaphore with a given number of locks.
acquire()
публичный Метод
getSize()
публичный Метод