On win10, running in the background sometimes stops
suzhengda opened this issue · comments
On the win10, it runs in the background, sometimes stops at regular intervals and needs to be reactivated for active windows to continue
Hey @suzhengda, what are you trying to do, which components are you using, and how are you running it?
Closing this due to a lack of feedback, as we can not reproduce this. Please come back with more details if this problem persists and we can reopen this 👍
Just for timing tasks
I use it this way:
$LOOP = React\EventLoop\Factory::create();
$SOCKET = new React\Socket\Server($LOOP);
$HTTP = new React\Http\Server($SOCKET, $LOOP);
$HTTP->on('request', $handel);
$SOCKET->listen($PORT ,'0.0.0.0' );
$LOOP -> addPeriodicTimer($peroid, function (React\EventLoop\Timer\Timer $timer ) use($task_queue) {});
$LOOP->run();
@suzhengda It looks like you're using a somewhat outdated version, can you try this again with the latest HTTP component (https://github.com/reactphp/http)? Thanks!
Latest edition of what? :-) React consists of individual components (https://github.com/reactphp/react/#getting-started) and from the snippet you've posted it's clear you're not using the latest version of the http component (https://github.com/reactphp/http).