Moving eventbus to run on main thread
This commit is contained in:
1 parent
13ad22dbb1
commit
0856548414
3 files changed
+6
-8
No files matched your search
@@ -9,13 +9,13 @@ EventBus::EventBus(Logger& logger) :
|
||||
_logger(logger)
|
||||
{
|
||||
_logger.debug.ln ("Starting Event Bus...");
|
||||
_thread = thread(&EventBus::run, this);
|
||||
//_thread = thread(&EventBus::run, this);
|
||||
_logger.debug.ln ("Event Bus Started");
|
||||
}
|
||||
|
||||
EventBus::~EventBus() {
|
||||
_logger.debug.ln ("Stopping Event Bus...");
|
||||
_thread.join();
|
||||
//_thread.join();
|
||||
// destroy all events in _events vector
|
||||
for (auto event : _events) { delete event; }
|
||||
_logger.debug.ln ("Event Bus stopped");
|
||||
|
||||
Reference in new issue
Block a user