2019-09-06 23:53:10 +08:00

17 lines
201 B
PHP
Executable File

<?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";
}