XThread: Don't release ourselves before calling thread_->Terminate!
This commit is contained in:
parent
b82f6a990a
commit
23b2e25fb8
|
@ -462,9 +462,14 @@ X_STATUS XThread::Terminate(int exit_code) {
|
||||||
emulator()->processor()->OnThreadExit(thread_id_);
|
emulator()->processor()->OnThreadExit(thread_id_);
|
||||||
|
|
||||||
running_ = false;
|
running_ = false;
|
||||||
Release();
|
if (XThread::IsInThread(this)) {
|
||||||
|
Release();
|
||||||
|
xe::threading::Thread::Exit(exit_code);
|
||||||
|
} else {
|
||||||
|
thread_->Terminate(exit_code);
|
||||||
|
Release();
|
||||||
|
}
|
||||||
|
|
||||||
thread_->Terminate(exit_code);
|
|
||||||
return X_STATUS_SUCCESS;
|
return X_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue