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:
@ -98,6 +98,8 @@ typedef struct WASMExecEnv {
|
||||
/* used to support debugger */
|
||||
korp_mutex wait_lock;
|
||||
korp_cond wait_cond;
|
||||
/* the count of threads which are joining current thread */
|
||||
uint32 wait_count;
|
||||
#endif
|
||||
|
||||
#if WASM_ENABLE_DEBUG_INTERP != 0
|
||||
|
||||
Reference in New Issue
Block a user