Icicle\Concurrent\Sync\PosixSemaphore::release PHP Method

release() protected method

Releases a lock from the semaphore.
protected release ( )
    protected function release()
    {
        // Call send in non-blocking mode. If the call fails because the queue
        // is full, then the number of locks configured is too large.
        if (!@msg_send($this->queue, 1, "", false, false, $errno)) {
            if ($errno === MSG_EAGAIN) {
                throw new SemaphoreException('The semaphore size is larger than the system allows.');
            }
            throw new SemaphoreException('Failed to release the lock.');
        }
    }