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:
Joel Dice 2010-11-22 16:46:10 -07:00
parent 878e98954b
commit b8063285f3

View File

@ -655,6 +655,8 @@ class MySystem: public System {
threadVisitor = 0;
system->visitLock->notifyAll(t);
return 0;
} else {
return -1;