We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc7a6a5 commit e886ed7Copy full SHA for e886ed7
include/reactor-cpp/connection.hh
@@ -147,7 +147,11 @@ public:
147
148
// Insert an empty event into the upstream event queue. This ensures that we
149
// will get notified and woken up as soon as the tag becomes safe to process.
150
+ // It is important to unlock the mutex here. Otherwise we could enter a deadlock as
151
+ // scheduling the upstream event also requires holding the upstream mutex.
152
+ lock.unlock();
153
bool result = this->upstream_port()->environment()->scheduler()->schedule_empty_async_at(tag);
154
+ lock.lock();
155
156
// If inserting the empty event was not successful, then this is because the upstream
157
// scheduler already processes a later event. In this case, it is safe to assume that
0 commit comments