public function _singleUpdateLock($lockFile)
    {
        $lockData = [
            'pid' => getmypid(),
            'expires_at' => time() + $this->singleSleep + $this->singleLockTimeout,
        ];

        return file_put_contents($lockFile, json_encode($lockData));
    }
public function _singleUpdateLock($lockFile)
    {
        $lockData = [
            'pid' => getmypid(),
            'expires_at' => time() + $this->singleSleep + $this->singleLockTimeout,
        ];

        return file_put_contents($lockFile, json_encode($lockData));
    }
public function _singleUpdateLock ( $ lockFile ) { $ lockData = [ 'pid' => getmypid ( ) , 'expires_at' => time ( ) + $ this -> singleSleep + $ this -> singleLockTimeout , ] ; return file_put_contents ( $ lockFile , json_encode ( $ lockData ) ) ; }
Single process creates or extends lock file

Extended second bases on sleep time and lock expiration

@param string $lockFile
@return void
Single process creates or extends lock file