diff options
Diffstat (limited to 'Swiften/EventLoop/SingleThreadedEventLoop.cpp')
| -rw-r--r-- | Swiften/EventLoop/SingleThreadedEventLoop.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Swiften/EventLoop/SingleThreadedEventLoop.cpp b/Swiften/EventLoop/SingleThreadedEventLoop.cpp index 4c5e209..c2235b1 100644 --- a/Swiften/EventLoop/SingleThreadedEventLoop.cpp +++ b/Swiften/EventLoop/SingleThreadedEventLoop.cpp @@ -18,25 +18,25 @@ SingleThreadedEventLoop::SingleThreadedEventLoop() : shouldShutDown_(false) { } SingleThreadedEventLoop::~SingleThreadedEventLoop() { if (!events_.empty()) { std::cerr << "Warning: Pending events in SingleThreadedEventLoop at destruction time." << std::endl; } } void SingleThreadedEventLoop::waitForEvents() { boost::unique_lock<boost::mutex> lock(eventsMutex_); - while (events_.size() == 0 && !shouldShutDown_) { + while (events_.empty() && !shouldShutDown_) { eventsAvailable_.wait(lock); } if (shouldShutDown_) throw EventLoopCanceledException(); } void SingleThreadedEventLoop::handleEvents() { // Make a copy of the list of events so we don't block any threads that post // events while we process them. std::vector<Event> events; { |
Swift