Order of semaphore processing

This commit is contained in:
Alexandre Alapetite 2017-07-07 18:26:43 +02:00
parent 3bb77d2686
commit 84972623f7

View file

@ -160,9 +160,9 @@ class Lock {
if (empty(self::$semaphore[$fn_name])) { if (empty(self::$semaphore[$fn_name])) {
return false; return false;
} else { } else {
$rid = self::$semaphore[$fn_name]; $success = @sem_release(self::$semaphore[$fn_name]);
self::$semaphore[$fn_name] = 0; self::$semaphore[$fn_name] = 0;
return @sem_release($rid); return $success;
} }
} }