dont lock on meta data operations
This commit is contained in:
parent
35c377f7a9
commit
1270c6800d
|
@ -960,7 +960,7 @@ class View {
|
||||||
if ($run and $storage) {
|
if ($run and $storage) {
|
||||||
if (in_array('write', $hooks) || in_array('delete', $hooks)) {
|
if (in_array('write', $hooks) || in_array('delete', $hooks)) {
|
||||||
$this->lockFile($path, ILockingProvider::LOCK_EXCLUSIVE);
|
$this->lockFile($path, ILockingProvider::LOCK_EXCLUSIVE);
|
||||||
} else {
|
} else if (in_array('read', $hooks)) {
|
||||||
$this->lockFile($path, ILockingProvider::LOCK_SHARED);
|
$this->lockFile($path, ILockingProvider::LOCK_SHARED);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
@ -972,7 +972,7 @@ class View {
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
if (in_array('write', $hooks) || in_array('delete', $hooks)) {
|
if (in_array('write', $hooks) || in_array('delete', $hooks)) {
|
||||||
$this->unlockFile($path, ILockingProvider::LOCK_EXCLUSIVE);
|
$this->unlockFile($path, ILockingProvider::LOCK_EXCLUSIVE);
|
||||||
} else {
|
} else if (in_array('read', $hooks)) {
|
||||||
$this->unlockFile($path, ILockingProvider::LOCK_SHARED);
|
$this->unlockFile($path, ILockingProvider::LOCK_SHARED);
|
||||||
}
|
}
|
||||||
throw $e;
|
throw $e;
|
||||||
|
@ -992,14 +992,14 @@ class View {
|
||||||
$result = CallbackWrapper::wrap($result, null, null, function () use ($hooks, $path) {
|
$result = CallbackWrapper::wrap($result, null, null, function () use ($hooks, $path) {
|
||||||
if (in_array('write', $hooks)) {
|
if (in_array('write', $hooks)) {
|
||||||
$this->unlockFile($path, ILockingProvider::LOCK_EXCLUSIVE);
|
$this->unlockFile($path, ILockingProvider::LOCK_EXCLUSIVE);
|
||||||
} else {
|
} else if (in_array('read', $hooks)) {
|
||||||
$this->unlockFile($path, ILockingProvider::LOCK_SHARED);
|
$this->unlockFile($path, ILockingProvider::LOCK_SHARED);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
if (in_array('write', $hooks) || in_array('delete', $hooks)) {
|
if (in_array('write', $hooks) || in_array('delete', $hooks)) {
|
||||||
$this->unlockFile($path, ILockingProvider::LOCK_EXCLUSIVE);
|
$this->unlockFile($path, ILockingProvider::LOCK_EXCLUSIVE);
|
||||||
} else {
|
} else if (in_array('read', $hooks)) {
|
||||||
$this->unlockFile($path, ILockingProvider::LOCK_SHARED);
|
$this->unlockFile($path, ILockingProvider::LOCK_SHARED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue