parallel
parallel copied to clipboard
On exit() in Future cancelled() and done() wont give true, but value() give Segmentation fault
This code
<?php
use parallel\{Channel, Runtime, Future, Events, Events\Event, Events\Input};
$runtime = new Runtime();
$future = $runtime ->run
(
function()
{
exit();
}
);
echo $future->done().'|';
echo $future->cancelled().'|';
#echo $future->value().'|';
exit('can work more');
I cant check what Future is exit status but if i will get value() script will force exit. But if will not check exit - it can work more.
How i can check the exit status or how dint exit main thread if get Future value what execute exit