public function releaseLock($lockFile)
{
if (!array_key_exists($lockFile, $this->lockHandles)) {
throw new Exception("Lock NOT held - bug? Lockfile: {$lockFile}");
}
if ($this->lockHandles[$lockFile]) {
ftruncate($this->lockHandles[$lockFile], 0);
flock($this->lockHandles[$lockFile], LOCK_UN);
}
unset($this->lockHandles[$lockFile]);
}