mirror of
https://github.com/corda/corda.git
synced 2025-01-03 19:54:13 +00:00
fix deadlock in allocate3 when another thread wants to enter the exclusive state
This commit is contained in:
parent
30c7107aa3
commit
9c9eb86b2f
@ -2055,6 +2055,10 @@ allocate3(Thread* t, Allocator* allocator, Machine::AllocationType type,
|
||||
// another thread wants to enter the exclusive state, either for a
|
||||
// collection or some other reason. We give it a chance here.
|
||||
ENTER(t, Thread::IdleState);
|
||||
|
||||
while (t->m->exclusive) {
|
||||
t->m->stateLock->wait(t->systemThread, 0);
|
||||
}
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
|
Loading…
Reference in New Issue
Block a user