Skip to content

Commit

Permalink
[Lock] fix derivating semaphore from key
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Jul 5, 2021
1 parent 246f802 commit 8c62591
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Store/SemaphoreStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private function lock(Key $key, bool $blocking)
return;
}

$keyId = crc32($key);
$keyId = unpack('i', md5($key, true))[1];
$resource = sem_get($keyId);
$acquired = @sem_acquire($resource, !$blocking);

Expand Down

0 comments on commit 8c62591

Please sign in to comment.