mirror of
https://github.com/YGGverse/Yo.git
synced 2026-03-31 17:55:35 +00:00
add semaphore namespace prefix
This commit is contained in:
parent
880764aa49
commit
ee074b684a
2 changed files with 12 additions and 2 deletions
|
|
@ -1,7 +1,12 @@
|
|||
<?php
|
||||
|
||||
// Prevent multi-thread execution
|
||||
$semaphore = sem_get(crc32('yo.cli.document.crawl'), 1);
|
||||
$semaphore = sem_get(
|
||||
crc32(
|
||||
__DIR__ . '.yo.cli.document.crawl'
|
||||
),
|
||||
1
|
||||
);
|
||||
|
||||
if (false === sem_acquire($semaphore, true))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue