diff options
Diffstat (limited to 'Swiften/EventLoop/SimpleEventLoop.h')
-rw-r--r-- | Swiften/EventLoop/SimpleEventLoop.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Swiften/EventLoop/SimpleEventLoop.h b/Swiften/EventLoop/SimpleEventLoop.h index eedaf88..221591e 100644 --- a/Swiften/EventLoop/SimpleEventLoop.h +++ b/Swiften/EventLoop/SimpleEventLoop.h @@ -3,14 +3,12 @@ * All rights reserved. * See the COPYING file for more information. */ #pragma once -#include <vector> -#include <boost/function.hpp> #include <boost/thread/mutex.hpp> #include <boost/thread/condition_variable.hpp> #include <Swiften/Base/API.h> #include <Swiften/EventLoop/EventLoop.h> @@ -28,20 +26,22 @@ namespace Swift { doRun(true); } void runOnce(); void stop(); - - virtual void post(const Event& event); + + protected: + virtual void eventPosted(); private: void doRun(bool breakAfterEvents); void doStop(); private: bool isRunning_; - std::vector<Event> events_; - boost::mutex eventsMutex_; - boost::condition_variable eventsAvailable_; + + bool eventAvailable_; + boost::mutex eventAvailableMutex_; + boost::condition_variable eventAvailableCondition_; }; } |