protected function lockExecute(callable $task)
    {
        if($this->mutex->isAcquired()) {
            return $task();
        }

        return $this->mutex->lockExecute($task);
    }
protected function lockExecute(callable $task)
    {
        if($this->mutex->isAcquired()) {
            return $task();
        }

        return $this->mutex->lockExecute($task);
    }
protected function lockExecute ( callable $ task ) { if ( $ this -> mutex -> isAcquired ( ) ) { return $ task ( ) ; } return $ this -> mutex -> lockExecute ( $ task ) ; }
Lock shared memory if lock not already acquired by this process

@param callable $task Function to execute

@return mixed    Whatever the $task function returns
Lock shared memory if lock not already acquired by this process