Lines Matching defs:lock
46 if (!$this->lock($target)) {
133 * We don't use io_lock() her because we do not wait for the lock and use a larger stale time
138 * @return bool true, if you got a succesful lock
141 protected function lock($id)
145 $lock = $conf['lockdir'] . '/_subscr_' . md5($id) . '.lock';
147 if (is_dir($lock) && time() - @filemtime($lock) > 60 * 5) {
148 // looks like a stale lock - remove it
149 @rmdir($lock);
152 // try creating the lock directory
153 if (!@mkdir($lock)) {
158 chmod($lock, $conf['dperm']);
175 $lock = $conf['lockdir'] . '/_subscr_' . md5($id) . '.lock';
176 return @rmdir($lock);