event/Call: invoke function directly if the EventLoop is dead
Works around a deadlock bug which happens when waiting for an EventLoop which isn't running anymore.
This commit is contained in:
parent
ce68701c0c
commit
3fd9a86f3c
|
@ -81,7 +81,7 @@ private:
|
|||
void
|
||||
BlockingCall(EventLoop &loop, std::function<void()> &&f)
|
||||
{
|
||||
if (loop.IsInside()) {
|
||||
if (loop.IsDead() || loop.IsInside()) {
|
||||
/* we're already inside the loop - we can simply call
|
||||
the function */
|
||||
f();
|
||||
|
|
Loading…
Reference in New Issue