We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 251caf8 commit 5a1d6bfCopy full SHA for 5a1d6bf
lib/wasi_threads.c
@@ -129,6 +129,18 @@ void
129
wasi_threads_instance_join(struct wasi_threads_instance *wasi)
130
{
131
toywasm_mutex_lock(&wasi->lock);
132
+#if 1
133
+ /*
134
+ * https://github.com/WebAssembly/wasi-threads/issues/21
135
+ *
136
+ * option b.
137
+ * proc_exit(0) equivalent. terminate all other threads.
138
+ */
139
+ if (!wasi->interrupt) {
140
+ xlog_trace("Emulating proc_exit(0) on a return from _start");
141
+ wasi->interrupt = 1;
142
+ }
143
+#endif
144
while (wasi->nrunners > 0) {
145
int ret = pthread_cond_wait(&wasi->cv, &wasi->lock.lock);
146
assert(ret == 0);
0 commit comments