mirror of
https://github.com/corda/corda.git
synced 2025-01-22 12:28:11 +00:00
leave thread in JoinedState instead of ZombieState in DetachCurrentThread
This commit is contained in:
parent
01dcb1661b
commit
0eba1eeaf2
@ -77,8 +77,17 @@ DetachCurrentThread(Machine* m)
|
||||
{
|
||||
Thread* t = static_cast<Thread*>(m->localThread->get());
|
||||
if (t) {
|
||||
expect(t, t != m->rootThread);
|
||||
|
||||
m->localThread->set(0);
|
||||
t->exit();
|
||||
|
||||
ACQUIRE_RAW(t, t->m->stateLock);
|
||||
|
||||
enter(t, Thread::ActiveState);
|
||||
enter(t, Thread::ZombieState);
|
||||
|
||||
t->state = Thread::JoinedState;
|
||||
|
||||
return 0;
|
||||
} else {
|
||||
return -1;
|
||||
|
@ -129,7 +129,7 @@ class MySystem: public System {
|
||||
|
||||
virtual void join() {
|
||||
int rv UNUSED = pthread_join(thread, 0);
|
||||
//expect(s, rv == 0);
|
||||
expect(s, rv == 0);
|
||||
}
|
||||
|
||||
virtual void dispose() {
|
||||
|
Loading…
Reference in New Issue
Block a user