src/Stiphle/Storage/Process.php
public function lock($key)
    {
        if (!isset($this->locked[$key])) {
            $this->locked[$key] = false;
        }

        $start = microtime(true);
        while($this->locked[$key]) {
            $passed = (microtime(true) - $start) * 1000;
            if ($passed > $this->lockWaitTimeout) {
                throw new LockWaitTimeoutException();
            }
        }

        $this->locked[$key] = true;

        return;
    }
public function lock($key)
    {
        if (!isset($this->locked[$key])) {
            $this->locked[$key] = false;
        }

        $start = microtime(true);
        while($this->locked[$key]) {
            $passed = (microtime(true) - $start) * 1000;
            if ($passed > $this->lockWaitTimeout) {
                throw new LockWaitTimeoutException();
            }
        }

        $this->locked[$key] = true;

        return;
    }
Lock

If we're using storage, we might have multiple requests coming in at
once, so we lock the storage

@return void