summaryrefslogtreecommitdiff
path: root/src/event/DeferredMonitor.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/event/DeferredMonitor.cxx')
-rw-r--r--src/event/DeferredMonitor.cxx20
1 files changed, 2 insertions, 18 deletions
diff --git a/src/event/DeferredMonitor.cxx b/src/event/DeferredMonitor.cxx
index 40b4b0b62..5f295946e 100644
--- a/src/event/DeferredMonitor.cxx
+++ b/src/event/DeferredMonitor.cxx
@@ -25,7 +25,7 @@ void
DeferredMonitor::Cancel()
{
#ifdef USE_INTERNAL_EVENTLOOP
- pending = false;
+ loop.RemoveDeferred(*this);
#endif
#ifdef USE_GLIB_EVENTLOOP
const auto id = source_id.exchange(0);
@@ -38,8 +38,7 @@ void
DeferredMonitor::Schedule()
{
#ifdef USE_INTERNAL_EVENTLOOP
- if (!pending.exchange(true))
- fd.Write();
+ loop.AddDeferred(*this);
#endif
#ifdef USE_GLIB_EVENTLOOP
const unsigned id = loop.AddIdle(Callback, this);
@@ -49,21 +48,6 @@ DeferredMonitor::Schedule()
#endif
}
-#ifdef USE_INTERNAL_EVENTLOOP
-
-bool
-DeferredMonitor::OnSocketReady(unsigned)
-{
- fd.Read();
-
- if (pending.exchange(false))
- RunDeferred();
-
- return true;
-}
-
-#endif
-
#ifdef USE_GLIB_EVENTLOOP
void