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

free() public method

Removes the semaphore if it still exists.
public free ( )
    public function free()
    {
        if (is_resource($this->queue) && msg_queue_exists($this->key)) {
            if (!msg_remove_queue($this->queue)) {
                throw new SemaphoreException('Failed to free the semaphore.');
            }
            $this->queue = null;
        }
    }