Native: improve ObjCExport thread state switching
This commit is contained in:
committed by
Space
parent
388538be60
commit
fa36ccedeb
@@ -149,6 +149,7 @@ RuntimeState* initRuntime() {
|
||||
}
|
||||
|
||||
void deinitRuntime(RuntimeState* state, bool destroyRuntime) {
|
||||
AssertThreadState(state->memoryState, kotlin::ThreadState::kRunnable);
|
||||
RuntimeAssert(state->status == RuntimeStatus::kRunning, "Runtime must be in the running state");
|
||||
state->status = RuntimeStatus::kDestroying;
|
||||
// This may be called after TLS is zeroed out, so ::runtimeState and ::memoryState in Memory cannot be trusted.
|
||||
|
||||
Reference in New Issue
Block a user