mirror of
https://github.com/corda/corda.git
synced 2025-02-02 17:21:06 +00:00
re-enter active state before throwing exception in wait()
This commit is contained in:
parent
9ad00d0ea3
commit
090cd8a209
@ -2049,9 +2049,11 @@ wait(Thread* t, object o, int64_t milliseconds)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (m and m->owner() == t->systemThread) {
|
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) {
|
if (interrupted) {
|
||||||
t->exception = makeInterruptedException(t);
|
t->exception = makeInterruptedException(t);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user