Fix thread manager issues (#962)

Fix the issue that joining a detached thread might result in joining hang,
resolve the issue by adding wait_count for a thread's exec_env to indicate
whether a thread needs to detach itself or not when it exits.

And add checks for the input exec_env for cluster's join/detach/cancel thread.
This commit is contained in:
Wenyong Huang
2022-01-17 17:09:04 +08:00
committed by GitHub
parent ee97e30a1a
commit 092efbfe21
3 changed files with 66 additions and 2 deletions

View File

@ -19,6 +19,7 @@ extern "C" {
#if WASM_ENABLE_DEBUG_INTERP != 0
typedef struct WASMDebugInstance WASMDebugInstance;
#endif
typedef struct WASMCluster {
struct WASMCluster *next;