summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root>2010-10-24 19:01:01 +0000
committerroot <root>2010-10-24 19:01:01 +0000
commit85f13ac497130415b7dc7f9555d0980a6b911a12 (patch)
tree66995df2b1c62eae1d8adff78bf8649ad1c3d9ef
parent89a42941133287392b81c95fca09de34118f1a30 (diff)
*** empty log message ***
-rw-r--r--ev.c9
-rw-r--r--ev.h2
2 files changed, 10 insertions, 1 deletions
diff --git a/ev.c b/ev.c
index 12dffb3..774dd69 100644
--- a/ev.c
+++ b/ev.c
@@ -1738,6 +1738,15 @@ ev_loop_destroy (EV_P)
{
int i;
+#if EV_CLEANUP_ENABLE
+ /* queue cleanup watchers (and execute them) */
+ if (expect_false (cleanupcnt))
+ {
+ queue_events (EV_A_ (W *)cleanups, cleanupcnt, EV_CLEANUP);
+ EV_INVOKE_PENDING;
+ }
+#endif
+
#if EV_CHILD_ENABLE
if (ev_is_active (&childev))
{
diff --git a/ev.h b/ev.h
index f0ffd4f..424269c 100644
--- a/ev.h
+++ b/ev.h
@@ -104,7 +104,7 @@ EV_CPP(extern "C" {)
#endif
#ifndef EV_CLEANUP_ENABLE
-# define EV_CLEANUP_ENABLE 0 /* not implemented */
+# define EV_CLEANUP_ENABLE EV_FEATURE_WATCHERS
#endif
#ifndef EV_SIGNAL_ENABLE