mirror of
https://github.com/corda/corda.git
synced 2025-01-22 12:28:11 +00:00
fix deadlock MySystem::visit in posix.cpp
We must call notifyAll on visitLock after setting threadVisitor to null in case another thread is waiting to do a visit of its own. Otherwise, the latter thread will wait forever, eventually deadlocking the whole VM at the next GC since it's in an active state.
This commit is contained in:
parent
878e98954b
commit
b8063285f3
@ -655,6 +655,8 @@ class MySystem: public System {
|
||||
|
||||
threadVisitor = 0;
|
||||
|
||||
system->visitLock->notifyAll(t);
|
||||
|
||||
return 0;
|
||||
} else {
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user