public function watchFunctionExit(\Jamm\Memory\IKeyLocker $ExitWatcher = NULL) { if ($this->in_throw) { $ExitWatcher->revoke(); return false; } $point_name = ':exit'; if (!empty($ExitWatcher)) { $point_name = $ExitWatcher->getKey() . $point_name; $ExitWatcher->revoke(); } $this->setPoint($point_name); }
public function release_access_write(IKeyLocker $autoUnlocker = NULL) { if (!empty($autoUnlocker)) { $autoUnlocker->revoke(); } if ($this->writers_count > 0) { $this->writers_count--; } if ($this->writers_count <= 0) { $this->decrement(self::writers); //tell to readers, that they can read now $this->release_writers_mutex(); } return true; }