Skip to content

Commit 5e8188b

Browse files
committed
Add deps based on EXIT_RUNTIME
1 parent 1dc7443 commit 5e8188b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/lib/libpthread.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ var LibraryPThread = {
7575
'$removeRunDependency',
7676
#endif
7777
'$spawnThread',
78+
#if EXIT_RUNTIME
79+
'$exitOnMainThread',
80+
#endif
7881
'_emscripten_thread_free_data',
7982
'exit',
8083
#if PTHREADS_DEBUG || ASSERTIONS
@@ -295,10 +298,12 @@ var LibraryPThread = {
295298
#endif
296299
} else if (cmd === 'callHandler') {
297300
Module[d.handler](...d.args);
301+
#if EXIT_RUNTIME
298302
} else if (cmd === 'processExit') {
299303
try {
300304
exitOnMainThread(d.code);
301305
} catch(e) {} // Swallow the ExitStatus exception, since we need to unwind here.
306+
#endif
302307
} else if (cmd) {
303308
// The received message looks like something that should be handled by this message
304309
// handler, (since there is a e.data.cmd field present), but is not one of the

0 commit comments

Comments
 (0)