]> rtime.felk.cvut.cz Git - sojka/libev.git/commitdiff
*** empty log message ***
authorMarc Alexander Lehmann <libev@schmorp.de>
Thu, 3 May 2012 16:00:47 +0000 (16:00 +0000)
committerMarc Alexander Lehmann <libev@schmorp.de>
Thu, 3 May 2012 16:00:47 +0000 (16:00 +0000)
Changes
ev.pod

diff --git a/Changes b/Changes
index 77d88463b5997d870eb552dcc0a59dcdaa4c3801..3346822439672c6b9bad8a0cee63e50ed4277f7d 100644 (file)
--- a/Changes
+++ b/Changes
@@ -8,6 +8,7 @@ TODO: ^ OR use WSASend/WSARecv on the handle, which always works
 TODO: assert on fd watcher linked list pointing to itself
 TODO: faq, process a thing in each iteration
 TODO: abuse idle watchers for their side effect
+TODO: abuse check watchers for their side effect
        - add throw() to all libev functions that cannot throw exceptions, for
           further code size decrease when compiling for C++.
         - add throw () to callbacks that must not throw exceptions (allocator,
diff --git a/ev.pod b/ev.pod
index 4d92b673173cf89e6ae7fdaac03dd09e25f5c2cf..78d4d38ca77105130fc63d8689f61df28da369dc 100644 (file)
--- a/ev.pod
+++ b/ev.pod
@@ -2883,7 +2883,12 @@ callback, free it. Also, use no error checking, as usual.
    static void
    idle_cb (struct ev_loop *loop, ev_idle *w, int revents)
    {
+     // stop the watcher
+     ev_idle_stop (loop, w);
+
+     // now we can free it
      free (w);
+
      // now do something you wanted to do when the program has
      // no longer anything immediate to do.
    }