parallel icon indicating copy to clipboard operation
parallel copied to clipboard

On exit() in Future cancelled() and done() wont give true, but value() give Segmentation fault

Open webrobot1 opened this issue 1 year ago • 0 comments

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

webrobot1 avatar Jul 18 '23 12:07 webrobot1