Metabor\Adapter\NinjaMutexLockAdapter::__construct PHP Method

__construct() public method

public __construct ( NinjaMutex\Lock\LockInterface $ninjaMutexLock, null | integer $timeout = null )
$ninjaMutexLock NinjaMutex\Lock\LockInterface
$timeout null | integer 1. null if you want blocking lock 2. 0 if you want just lock and go 3. $timeout > 0 if you want to wait for lock some time (in milliseconds)
    public function __construct(LockInterface $ninjaMutexLock, $timeout = null)
    {
        $this->ninjaMutexLock = $ninjaMutexLock;
        $this->timeout = $timeout;
    }