Closed travishaagen closed 4 years ago
Thanks! I will prepare test shortly and I will merge. I need to check this also with develop
branch as some big changes are happening :)
Hey so I revived your PR. I think that your fix can introduce other type of issues. I prepared proper test for this case on the development branch. New approach how EventBus should work eliminate this issue.
Other issues that I see:
If you use recursive mutex it means that processing of event may happen on other thread that was intended by calling process
this may lead to data race.
Thanks!
Fixed single-threaded event-loop deadlock by using
recursive_mutex
forAsyncEventBus
's_callbacksMutex
.A single thread executed the event loop:
I discovered that when an event-handler was invoked that a deadlock would occur when I put another event on the bus from within that same event-handler callback method. With this change it works.