malkusch\lock\mutex\SemaphoreMutex::__construct PHP Method

__construct() public method

Use {@link sem_get()} to create the semaphore id. Example: $semaphore = sem_get(ftok(__FILE__, "a")); $mutex = new SemaphoreMutex($semaphore);
public __construct ( $semaphore )
    public function __construct($semaphore)
    {
        if (!is_resource($semaphore)) {
            throw new \InvalidArgumentException("The semaphore id is not a valid resource.");
        }
        $this->semaphore = $semaphore;
    }