Main thread spread exception when thread-mgr is enabled (#1889)

And refactor clear_wasi_proc_exit_exception, refer to
https://github.com/bytecodealliance/wasm-micro-runtime/pull/1869
This commit is contained in:
Xu Jun
2023-01-20 08:54:27 +08:00
committed by GitHub
parent cb7ac8fee3
commit cadf9d0ad3
10 changed files with 255 additions and 142 deletions

View File

@ -181,6 +181,9 @@ wasm_exec_env_destroy(WASMExecEnv *exec_env)
the stopped thread will be overrided by other threads */
wasm_cluster_thread_exited(exec_env);
#endif
/* We have terminated other threads, this is the only alive thread, so
* we don't acquire cluster->lock because the cluster will be destroyed
* inside this function */
wasm_cluster_del_exec_env(cluster, exec_env);
}
#endif /* end of WASM_ENABLE_THREAD_MGR */