mirror of
https://github.com/YGGverse/Yo.git
synced 2025-02-06 03:44:14 +00:00
fix semaphore condition #5
This commit is contained in:
parent
a499c363f6
commit
015221eafb
@ -3,6 +3,11 @@
|
||||
// Prevent multi-thread execution
|
||||
$semaphore = sem_get(crc32('yo.cli.document.clean'), 1);
|
||||
|
||||
if (false === sem_acquire($semaphore, true))
|
||||
{
|
||||
exit ('process execution locked by another thread!' . PHP_EOL);
|
||||
}
|
||||
|
||||
// Load dependencies
|
||||
require_once __DIR__ . '/../../../vendor/autoload.php';
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user