Closed l3aro closed 1 month ago
Hey @l3aro thanks for the suggestion. The PR looks good, I just want to find some time to give it a full test at some decent scale and will report back when I've had the opportunity to do so.
Tested and working great. Nice addtion, thank you!
@l3aro @joedixon async(callable():(PromiseInterface<T>|T) $function): (callable():PromiseInterface<T>)
only makes sense if the callback uses the await(PromiseInterface<T> $promise): T
. See: https://github.com/reactphp/async?tab=readme-ov-file#async. Looks like this commit uses async()
incorrectly.
ReactPHP runs in one thread and can't be interrupted. So, when we have some blocking stuff inside one of the handlers, for example connection to Redis not stable, or turn on xDebug make garbage collector slower than usual, the whole loop is blocked, and all other handlers will be delayed!