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
|
classpath = classpath
|
||||||
test = test
|
test = test
|
||||||
|
|
||||||
input = $(cls)/Exceptions.class
|
input = $(cls)/Threads.class
|
||||||
|
|
||||||
cxx = g++
|
cxx = g++
|
||||||
cc = gcc
|
cc = gcc
|
||||||
|
@ -288,6 +288,7 @@ class MySystem: public System {
|
|||||||
}
|
}
|
||||||
|
|
||||||
t->flags = 0;
|
t->flags = 0;
|
||||||
|
t->next = 0;
|
||||||
|
|
||||||
if (t->r->interrupted()) {
|
if (t->r->interrupted()) {
|
||||||
t->r->setInterrupted(false);
|
t->r->setInterrupted(false);
|
||||||
@ -330,15 +331,10 @@ class MySystem: public System {
|
|||||||
Thread* t = static_cast<Thread*>(context);
|
Thread* t = static_cast<Thread*>(context);
|
||||||
|
|
||||||
if (owner_ == t) {
|
if (owner_ == t) {
|
||||||
for (Thread** p = &first; *p;) {
|
for (Thread* t = first; t; t = t->next) {
|
||||||
Thread* t = *p;
|
|
||||||
p = &(t->next);
|
|
||||||
if (t == last) {
|
|
||||||
last = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
doNotify(t);
|
doNotify(t);
|
||||||
}
|
}
|
||||||
|
first = last = 0;
|
||||||
} else {
|
} else {
|
||||||
sysAbort(s);
|
sysAbort(s);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user