Re: PHP True Async RFC

From: Date: Mon, 10 Mar 2025 11:20:28 +0000
Subject: Re: PHP True Async RFC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
> 
> Yeah, this is a Watcher, a periodic function that is called to clean up or check something.
> Yes, it’s a very specific pattern. And of course, the Watcher belongs to the service. If the
> service is destroyed, the Watcher should also be stopped.

It’s a Async\Interval, but it behaves entirely like a background fiber (and it can be implemented
using a background fiber as well): what I mean is, it can be treated in the same way as a background
fiber, because it’s an background task that can be spawned by the library in any method: if
await_all was used during construction but not during destruction, it would cause a deadlock
(because it would wait for an uncontrolled background task when exiting the block, according the
proposed functionality of wait_all).

Regards,
Daniil Gentili.


Thread (110 messages)

« previous php.internals (#126691) next »