diff options
Diffstat (limited to 'src/event/Call.cxx')
-rw-r--r-- | src/event/Call.cxx | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/event/Call.cxx b/src/event/Call.cxx index ab1d5ffbd..bc6106bf7 100644 --- a/src/event/Call.cxx +++ b/src/event/Call.cxx @@ -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(); |