summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root>2012-05-03 16:00:47 +0000
committerroot <root>2012-05-03 16:00:47 +0000
commitae4bdb97fce8293731b329bb2fb204ed8a67b263 (patch)
tree21cf7d9b5b9ab985d98ba05f7761712efec764fa
parent1c5aa3ec0e061a4727e2bfa1d55380fa4efda369 (diff)
*** empty log message ***
-rw-r--r--Changes1
-rw-r--r--ev.pod5
2 files changed, 6 insertions, 0 deletions
diff --git a/Changes b/Changes
index 77d8846..3346822 100644
--- 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 4d92b67..78d4d38 100644
--- 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.
}