fixed some testing bugs
This commit is contained in:
@@ -26,7 +26,8 @@ EventNotifier::~EventNotifier()
|
||||
{
|
||||
is_running = false;
|
||||
|
||||
event_queue.release();
|
||||
Event end_event(0, 0, "END");
|
||||
event_queue.push(end_event);
|
||||
|
||||
notify_thread.join();
|
||||
}
|
||||
@@ -54,6 +55,12 @@ void EventNotifier::notify()
|
||||
{
|
||||
Event event = event_queue.pop();
|
||||
|
||||
// TODO schoener machen
|
||||
if(event.name == "END")
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// getting a guard and calling all registered handlers
|
||||
std::lock_guard<std::mutex> event_handler_guard(event_handler_mutex);
|
||||
for(auto handler : event_handler)
|
||||
|
||||
Reference in New Issue
Block a user