You've already forked qlg.tsgz.moe
Init Repo
This commit is contained in:
16
vendor/swoole/examples/atomic/wait.php
vendored
Executable file
16
vendor/swoole/examples/atomic/wait.php
vendored
Executable file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
$n = new swoole_atomic(0);
|
||||
|
||||
if (pcntl_fork() > 0)
|
||||
{
|
||||
echo "master start\n";
|
||||
$n->wait(1.5);
|
||||
echo "master end\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "child start\n";
|
||||
sleep(1);
|
||||
$n->wakeup();
|
||||
echo "child end\n";
|
||||
}
|
Reference in New Issue
Block a user