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

__construct() public method

Creates a new semaphore with a given number of locks.
public __construct ( integer $maxLocks, integer $permissions = 384 )
$maxLocks integer The maximum number of locks that can be acquired from the semaphore.
$permissions integer Permissions to access the semaphore.
    public function __construct($maxLocks, $permissions = 0600)
    {
        if (!extension_loaded("sysvmsg")) {
            throw new UnsupportedError(__CLASS__ . " requires the sysvmsg extension.");
        }
        $this->init($maxLocks, $permissions);
    }