Hi!
On Thu, Feb 18, 2016 at 12:51:19PM +0100, Marc Lehmann wrote:
> How do you know there are no other (for example internal) event watchers?
[cut]
> Well, libev cannot really know which events you are waiting for and
> instead returns after any single event. Note that using RUN_ONCE to wait
> for specific events likely means you are doing it wrong, so it's best to
> use an event-based approach, using callbacks.
>
> You shouldn't test for undocumented behaviour or internals in libev, that
> will break sooner or later.
Okay, that makes sense, thanks.
If it works this way (because of internal libev watchers), then I see
possible use cases for EV::run(0) and EV::run(RUN_NOWAIT), but can't
imagine use cases for RUN_ONCE. Are there some examples for RUN_ONCE uses?
--
WBR, Alex.
_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/mailman/listinfo/libev