Browse Source

Better handling when we can not get a lock.

pull/640/head
willtp87 9 years ago
parent
commit
db8062fda9
  1. 7
      includes/tuque_wrapper.inc

7
includes/tuque_wrapper.inc

@ -493,10 +493,9 @@ class IslandoraFedoraApiM extends FedoraApiM {
if (variable_get('islandora_use_object_semaphores', FALSE)) {
$lock_period = variable_get('islandora_semaphore_period', 600);
if (!lock_acquire($pid, $lock_period)) {
// Waiting forever.
while (!lock_wait($pid) && lock_acquire($pid, $lock_period)) {
break;
while (!lock_acquire($pid, $lock_period)) {
// Wait for the lock to be free. In the worst case forever.
while (lock_wait($pid)) {
}
}
$locked = TRUE;

Loading…
Cancel
Save