event/DeferredMonitor: use EventLoop::AddIdle()

This commit is contained in:
Max Kellermann
2013-08-07 19:38:10 +02:00
parent fdc7d13ad1
commit 977004c350
5 changed files with 16 additions and 7 deletions

View File

@@ -32,7 +32,7 @@ DeferredMonitor::Cancel()
void
DeferredMonitor::Schedule()
{
const unsigned id = g_idle_add(Callback, this);
const unsigned id = loop.AddIdle(Callback, this);
const auto old_id = source_id.exchange(id);
if (old_id != 0)
g_source_remove(old_id);