We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If pcntl_async_signals is set to true then all signals will be processed async and immediate.
But if context of execution is not in NativeDriver (in synchronous code) then this error happens:
^CPHP Warning: Invalid callback Amp\Loop\NativeDriver::handleSignal, cannot access private method Amp\Loop\NativeDriver::handleSignal() in /app/test.php on line 9 PHP Stack trace: PHP 1. {main}() /app/test.php:0 PHP 2. Amp\Loop::run($callback = *uninitialized*) /app/test.php:11 PHP 3. Amp\Loop\NativeDriver->run() /app/vendor/amphp/amp/lib/Loop.php:84 PHP 4. Amp\Loop\NativeDriver->tick() /app/vendor/amphp/amp/lib/Loop/Driver.php:72 PHP 5. Amp\Loop\NativeDriver->dispatch($blocking = *uninitialized*) /app/vendor/amphp/amp/lib/Loop/Driver.php:134 PHP 6. {closure:/app/test.php:8-10}(*uninitialized*, *uninitialized*) /app/vendor/amphp/amp/lib/Loop/NativeDriver.php:130
Example code to reproduce error:
<?php require __DIR__.'/vendor/autoload.php'; pcntl_async_signals(true); \Amp\Loop::onSignal(SIGINT, function (){ echo "sigterm\n"; }); \Amp\Loop::repeat(100, function(){ sleep(1); }); \Amp\Loop::run();
I understand that amp not support sync code and this error will be only in rare cases.
P.S.: sorry for bad english.
The text was updated successfully, but these errors were encountered:
ef83723
May be need to enable async signals by default ?
Sorry, something went wrong.
No branches or pull requests
Php 7.1 introduce new way to handle signals.
If pcntl_async_signals is set to true then all signals will be processed async and immediate.
But if context of execution is not in NativeDriver (in synchronous code) then this error happens:
Example code to reproduce error:
I understand that amp not support sync code and this error will be only in rare cases.
P.S.: sorry for bad english.
The text was updated successfully, but these errors were encountered: