reactphp / reactphp

Event-driven, non-blocking I/O with PHP.

Home Page:https://reactphp.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 👍

@WyriHaximus

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!

@clue What's the latest edition?

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).

@clue
Thank you

I can't install it. What should i do? Composer.phar has no response @clue. Am I short of something? :-)
When I install my outdated version has no problem . ha ha