Re: PHP True Async RFC

From: Date: Mon, 10 Mar 2025 11:13:27 +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 internals+get-126690@lists.php.net to get a copy of this message
> > Sure: > 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. In the context of this RFC, it's better to use the Async\Interval class. > > contains multiple examples of tasks of the same kind in my own library (ping loops to keep connections alive, > read loops to handle updates (which contain vital information needed to keep the client running correctly) in the background, etc...), all started on > __construct when initialising the library, and stopped in __destruct when they are not needed anymore. > Thank you, I will read it. -- Ed.

« previous php.internals (#126690) next »