pcntl not required, except it is
micah1701 opened this issue · 2 comments
Maybe this isn't an issue and just my misunderstanding but I would think other's (especially those of us forced to run on Windows) have encountered it.
The pcntl extension is not implicitly required for amphp/parallel but I haven't found an obvious way to tell Revolt\EndLoop to know this when it picks an event loop driver.
When I run:
$worker = Worker\createWorker();
$execution = $worker->submit($task);
amphp's process_runner.php
closure-wrap does a try-catch to un-reference any ignored signals. But this is a Revolt function which does it's do-diligence to see if I can use signals, which I can't, so it dies with an error. I just want to use a timer
EventLoop, not a signal
but I can't get passed this problem.
Perhaps this a Revolt problem and not an ampphp issue? ...but asking here since amp3.0 and parallel 2.0 force the use of Revolt\EndLoop.
Thanks for any assistance!
process-runner.php
should be catching the exception from the event loop if signal handling is not supported. What is the error you're getting?
You are correct, and it took you saying it "out loud" for me to realize that this is actually a non-issue. My debugger was set to break on Exceptions and somehow it didn't click for me that this wasn't a notice, warning, or error. I wasn't thinking fourth-dimensionally; in production it will fail gracefully. I feel a bit silly now although I appreciate your quick reply and, of course, your intensive efforts at maintaining this library.