src/Util/Mutex.php
public function lock(bool $wait = true): bool
    {
        if ($this->fp === null) {
            $this->fp = fopen($this->file, 'r');
        }

        return flock($this->fp, $wait ? LOCK_EX : LOCK_EX | LOCK_NB);
    }
public function lock(bool $wait = true): bool
    {
        if ($this->fp === null) {
            $this->fp = fopen($this->file, 'r');
        }

        return flock($this->fp, $wait ? LOCK_EX : LOCK_EX | LOCK_NB);
    }
public function lock ( bool $ wait = true ) : bool { if ( $ this -> fp === null ) { $ this -> fp = fopen ( $ this -> file , 'r' ) ; } return flock ( $ this -> fp , $ wait ? LOCK_EX : LOCK_EX | LOCK_NB ) ; }
Acquire the mutex

@param bool $wait
@return  boolean
Acquire the mutex