Lines Matching full:lock
10 * Adapted from the {@link Indexer::lock()}
13 * https://forum.dokuwiki.org/d/21044-taskrunner-running-multiple-times-eating-the-memory-lock
17 * ComboLockTaskRunner(): Trying to get a lock
29 * ComboDispatchEvent(): Trying to get a lock
31 * ComboDispatchEvent(): Lock Released
32 * ComboLockTaskRunner(): Lock Released
35 class Lock class
60 $this->lockFile = $conf['lockdir'] . "/_{$this->lockName}.lock";
64 public static function create(string $name): Lock
66 return new Lock($name);
72 function acquire(): Lock
78 … * * other processes may ignore the lock completely it only affects those that call the flock call.
80 … * LOCK_SH means SHARED LOCK. Any number of processes MAY HAVE A SHARED LOCK simultaneously. It is…
81 …* * LOCK_EX means EXCLUSIVE LOCK. Only a single process may possess an exclusive lock to a given f…
87 * When the file is closed, the lock is released by the system anyway.
92 * Old lock ? More than 10 minutes run
96 … throw new ExceptionRuntimeInternal("Removing the lock failed ($this->lockFile)");
101 …throw new ExceptionTimeOut("Unable to get the lock ($this->lockFile) for ($this->timeOut) seconds"…
108 register_shutdown_function([Lock::class, 'shutdownHandling'], $this->lockName);
116 * due to time exceed for instance that cleans the lock created.
121 * The lock are created in the `before` of the the task runner event
123 * If their is an error somewhere such as as a timeout, the lock
126 * @param $name - the lock name
133 * that is a called via the register_shutdown_function of {@link Lock::acquire()}
139 print "Lock::shutdownHandling(): Deleting the lock $name";
142 Lock::create($name)->release();
146 * Release the lock
171 public function setTimeout(int $int): Lock
195 * LOCK_EX: exclusive lock