Changeset View
Changeset View
Standalone View
Standalone View
src/filesystem/PhutilLock.php
Show First 20 Lines • Show All 188 Lines • ▼ Show 20 Lines | /* -( Locking )------------------------------------------------------------ */ | ||||
* @return this | * @return this | ||||
* | * | ||||
* @task lock | * @task lock | ||||
*/ | */ | ||||
final public function unlock() { | final public function unlock() { | ||||
if (!$this->locked) { | if (!$this->locked) { | ||||
$name = $this->getName(); | $name = $this->getName(); | ||||
throw new Exception( | throw new Exception( | ||||
pht("Lock '%s is not locked by this process!", $name)); | pht("Lock '%s' is not locked by this process!", $name)); | ||||
} | } | ||||
$this->doUnlock(); | $this->doUnlock(); | ||||
$profiler = PhutilServiceProfiler::getInstance(); | $profiler = PhutilServiceProfiler::getInstance(); | ||||
$profiler->endServiceCall( | $profiler->endServiceCall( | ||||
$this->profilerID, | $this->profilerID, | ||||
array( | array( | ||||
Show All 30 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0