From a7873da89dd835802fa957ebeefa7cd403d519a9 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 25 Apr 2019 16:21:07 +0200 Subject: [PATCH] Eventqueue: Remove unused code --- lib/remote/eventqueue.cpp | 19 ------------------- lib/remote/eventqueue.hpp | 2 -- 2 files changed, 21 deletions(-) diff --git a/lib/remote/eventqueue.cpp b/lib/remote/eventqueue.cpp index 178f095cc..2a7869d45 100644 --- a/lib/remote/eventqueue.cpp +++ b/lib/remote/eventqueue.cpp @@ -90,25 +90,6 @@ void EventQueue::SetFilter(std::unique_ptr filter) m_Filter.swap(filter); } -Dictionary::Ptr EventQueue::WaitForEvent(void *client, double timeout) -{ - boost::mutex::scoped_lock lock(m_Mutex); - - for (;;) { - auto it = m_Events.find(client); - ASSERT(it != m_Events.end()); - - if (!it->second.empty()) { - Dictionary::Ptr result = *it->second.begin(); - it->second.pop_front(); - return result; - } - - if (!m_CV.timed_wait(lock, boost::posix_time::milliseconds(long(timeout * 1000)))) - return nullptr; - } -} - std::vector EventQueue::GetQueuesForType(const String& type) { EventQueueRegistry::ItemMap queues = EventQueueRegistry::GetInstance()->GetItems(); diff --git a/lib/remote/eventqueue.hpp b/lib/remote/eventqueue.hpp index 29f9314f7..ec389929a 100644 --- a/lib/remote/eventqueue.hpp +++ b/lib/remote/eventqueue.hpp @@ -36,8 +36,6 @@ public: void SetTypes(const std::set& types); void SetFilter(std::unique_ptr filter); - Dictionary::Ptr WaitForEvent(void *client, double timeout = 5); - static std::vector GetQueuesForType(const String& type); static void UnregisterIfUnused(const String& name, const EventQueue::Ptr& queue); -- 2.40.0