On Sat, Jul 14, 2018 at 01:43:07AM +0900, 裕士辻 <kikikaikai...@gmail.com> wrote: > I use ev_once, it's very convenience. But I have a problem about it. > I seem there is no stop API for ev_once, isn't it?
No, there isn't. If you need the ability to stop watchers, you need to create one with the other API functions. I suggest you look at the implementation of ev_once in ev.c and roll your own, as ev_once is close to trivial - it basically malloc's a struct with an ev_timer and an ev_io watcher and starts them, freeing the struct when the event fires. Adding a stop API seemingly makes little sense, as ev_once is provided for just those cases where you don't need this functionality, for everything else you can use a normal watcher. -- The choice of a Deliantra, the free code+content MORPG -----==- _GNU_ http://www.deliantra.net ----==-- _ generation ---==---(_)__ __ ____ __ Marc Lehmann --==---/ / _ \/ // /\ \/ / schm...@schmorp.de -=====/_/_//_/\_,_/ /_/\_\ _______________________________________________ libev mailing list libev@lists.schmorp.de http://lists.schmorp.de/mailman/listinfo/libev