aboutsummaryrefslogtreecommitdiffstats
path: root/src/event
diff options
context:
space:
mode:
Diffstat (limited to 'src/event')
-rw-r--r--src/event/Loop.cxx19
-rw-r--r--src/event/Loop.hxx9
2 files changed, 0 insertions, 28 deletions
diff --git a/src/event/Loop.cxx b/src/event/Loop.cxx
index 92492387b..e2f021016 100644
--- a/src/event/Loop.cxx
+++ b/src/event/Loop.cxx
@@ -194,16 +194,6 @@ EventLoop::Run()
#ifdef USE_INTERNAL_EVENTLOOP
void
-EventLoop::AddCall(std::function<void()> &&f)
-{
- mutex.lock();
- calls.push_back(f);
- mutex.unlock();
-
- wake_fd.Write();
-}
-
-void
EventLoop::AddDeferred(DeferredMonitor &d)
{
mutex.lock();
@@ -262,15 +252,6 @@ EventLoop::OnSocketReady(gcc_unused unsigned flags)
mutex.lock();
}
- while (!calls.empty() && !quit) {
- auto f = std::move(calls.front());
- calls.pop_front();
-
- mutex.unlock();
- f();
- mutex.lock();
- }
-
mutex.unlock();
return true;
diff --git a/src/event/Loop.hxx b/src/event/Loop.hxx
index 0586a1f68..60d52ba52 100644
--- a/src/event/Loop.hxx
+++ b/src/event/Loop.hxx
@@ -30,7 +30,6 @@
#include "WakeFD.hxx"
#include "SocketMonitor.hxx"
-#include <functional>
#include <list>
#include <set>
#endif
@@ -91,7 +90,6 @@ class EventLoop final
std::list<IdleMonitor *> idle;
Mutex mutex;
- std::list<std::function<void()>> calls;
std::list<DeferredMonitor *> deferred;
unsigned now_ms;
@@ -157,13 +155,6 @@ public:
void CancelTimer(TimeoutMonitor &t);
/**
- * Schedule a function to be called inside the thread.
- *
- * This method is thread-safe.
- */
- void AddCall(std::function<void()> &&f);
-
- /**
* Schedule a call to DeferredMonitor::RunDeferred().
*
* This method is thread-safe.