aboutsummaryrefslogtreecommitdiffstats
path: root/src/event/Call.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/event/Call.cxx')
-rw-r--r--src/event/Call.cxx23
1 files changed, 1 insertions, 22 deletions
diff --git a/src/event/Call.cxx b/src/event/Call.cxx
index ab1d5ffbd..bc16c4e95 100644
--- a/src/event/Call.cxx
+++ b/src/event/Call.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2013 The Music Player Daemon Project
+ * Copyright (C) 2003-2014 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -28,9 +28,7 @@
#include <assert.h>
class BlockingCallMonitor final
-#ifndef USE_EPOLL
: DeferredMonitor
-#endif
{
const std::function<void()> f;
@@ -40,24 +38,13 @@ class BlockingCallMonitor final
bool done;
public:
-#ifdef USE_EPOLL
- BlockingCallMonitor(EventLoop &loop, std::function<void()> &&_f)
- :f(std::move(_f)), done(false) {
- loop.AddCall([this](){
- this->DoRun();
- });
- }
-#else
BlockingCallMonitor(EventLoop &_loop, std::function<void()> &&_f)
:DeferredMonitor(_loop), f(std::move(_f)), done(false) {}
-#endif
void Run() {
-#ifndef USE_EPOLL
assert(!done);
Schedule();
-#endif
mutex.lock();
while (!done)
@@ -65,16 +52,8 @@ public:
mutex.unlock();
}
-#ifndef USE_EPOLL
private:
virtual void RunDeferred() override {
- DoRun();
- }
-
-#else
-public:
-#endif
- void DoRun() {
assert(!done);
f();