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

Reply via email to