re-enter active state before throwing exception in wait()

This commit is contained in:
Joel Dice 2008-01-17 18:32:07 -07:00
parent 9ad00d0ea3
commit 090cd8a209

View File

@ -2049,9 +2049,11 @@ wait(Thread* t, object o, int64_t milliseconds)
}
if (m and m->owner() == t->systemThread) {
ENTER(t, Thread::IdleState);
bool interrupted;
{ ENTER(t, Thread::IdleState);
interrupted = m->wait(t->systemThread, milliseconds);
}
bool interrupted = m->wait(t->systemThread, milliseconds);
if (interrupted) {
t->exception = makeInterruptedException(t);
}