mirror of
https://github.com/corda/corda.git
synced 2025-01-16 01:40:17 +00:00
fix failure to remove thread from wait list in System::Monitor::notifyAll()
This commit is contained in:
parent
5e336544f5
commit
73155c6196
2
makefile
2
makefile
@ -16,7 +16,7 @@ src = src
|
||||
classpath = classpath
|
||||
test = test
|
||||
|
||||
input = $(cls)/Exceptions.class
|
||||
input = $(cls)/Threads.class
|
||||
|
||||
cxx = g++
|
||||
cc = gcc
|
||||
|
@ -288,6 +288,7 @@ class MySystem: public System {
|
||||
}
|
||||
|
||||
t->flags = 0;
|
||||
t->next = 0;
|
||||
|
||||
if (t->r->interrupted()) {
|
||||
t->r->setInterrupted(false);
|
||||
@ -330,15 +331,10 @@ class MySystem: public System {
|
||||
Thread* t = static_cast<Thread*>(context);
|
||||
|
||||
if (owner_ == t) {
|
||||
for (Thread** p = &first; *p;) {
|
||||
Thread* t = *p;
|
||||
p = &(t->next);
|
||||
if (t == last) {
|
||||
last = 0;
|
||||
}
|
||||
|
||||
for (Thread* t = first; t; t = t->next) {
|
||||
doNotify(t);
|
||||
}
|
||||
first = last = 0;
|
||||
} else {
|
||||
sysAbort(s);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user