Closed SerafimArts closed 1 year ago
Hey @SerafimArts, the current plan is combined both clients into one still with ReactPHP as backend and exposing a fiber based API that doesn't expose any promises.
ReactPHP does not provide the ability to manually control the event loop.
Like:
while ($loop->isRunning()) {
$loop->tick();
// Do something else not related to the loop
}
In any case, thanks for the reply! I will think about how to solve the problem =(
P.S. Those. the problem is not that there are Promises, but that in the current version I cannot control the event loop by myself.
Well what is the problem that you are trying to solve by controlling the event loop?
The absence of a global breakpoint (i.e. the physical absence of a while(true)
).
Well, the physical absence of the event loop, too, because. in fact, it is simply not needed =)))
While we officially don't recommend it, you can do something like this to control the event loop:
while(true) {
Loop::addTimer(0.01, static function (): void {Loop::stop()});
Loop::run();
}
It's too strong looks like a perversion)))
It is :joy:
Hello! Thank you very much for the work done!
Can you please tell me if it is planned to add native PHP support? Would like to see something like: