refactoring to interfaces complete

This commit is contained in:
Jonas Zeunert
2018-06-14 21:37:54 +02:00
parent 13b5cc0b33
commit 692a2bd68f
11 changed files with 41 additions and 37 deletions

View File

@@ -41,7 +41,7 @@ void EventNotifier::unregister_event_handler(IEventHandler* handler)
event_handler.erase(handler);
}
void EventNotifier::distribute_event(IEvent& event)
void EventNotifier::distribute_event(Event& event)
{
event_queue.push(event);
}
@@ -56,7 +56,7 @@ void EventNotifier::notify()
std::lock_guard<std::mutex> event_handler_guard(event_handler_mutex);
for(auto handler : event_handler)
{
boost::thread handler_caller(boost::bind(&EventHandler::handle, handler, event));
boost::thread handler_caller(boost::bind(&IEventHandler::handle, handler, event));
if(!handler_caller.timed_join(boost::posix_time::milliseconds(HANDLER_TIMEOUT)))
{