You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// keep the pthread alive for asynchronous events.
231
+
err('Pthread 0x'+Module['_pthread_self']().toString(16)+' completed its pthread main entry point with an unwind, keeping the pthread worker alive for asynchronous operation.');
238
232
#endif
239
-
// ExitStatus not present in MINIMAL_RUNTIME
240
-
#if !MINIMAL_RUNTIME
241
-
if(exinstanceofModule['ExitStatus']){
242
-
if(Module['getNoExitRuntime']()){
233
+
return;
234
+
}
243
235
#if ASSERTIONS
244
-
err('Pthread 0x'+Module['_pthread_self']().toString(16)+' called exit(), staying alive due to noExitRuntime.');
236
+
// FIXME(sbc): Figure out if this is still needed or useful. Its not
237
+
// clear to me how this check could ever fail. In order to get into
238
+
// this try/catch block at all we have already called bunch of
239
+
// functions on `Module`.. why is this one special?
err('Pthread 0x'+Module['_pthread_self']().toString(16)+' called exit(), calling threadExit.');
250
+
err('Pthread 0x'+Module['_pthread_self']().toString(16)+' called exit(), staying alive due to noExitRuntime.');
249
251
#endif
250
-
Module['PThread'].threadExit(ex.status);
251
-
}
252
-
}
253
-
else
252
+
}else{
253
+
#if ASSERTIONS
254
+
err('Pthread 0x'+Module['_pthread_self']().toString(16)+' called exit(), calling threadExit.');
254
255
#endif
255
-
{
256
-
Module['PThread'].threadExit(-2);
257
-
throwex;
256
+
Module['PThread'].threadExit(ex.status);
258
257
}
259
-
#if ASSERTIONS
260
-
}else{
261
-
// else e == 'unwind', and we should fall through here and keep the pthread alive for asynchronous events.
262
-
err('Pthread 0x'+Module['_pthread_self']().toString(16)+' completed its pthread main entry point with an unwind, keeping the pthread worker alive for asynchronous operation.');
258
+
}
259
+
else
263
260
#endif
261
+
{
262
+
Module['PThread'].threadExit(-2);
263
+
throwex;
264
264
}
265
265
}
266
266
}elseif(e.data.cmd==='cancel'){// Main thread is asking for a pthread_cancel() on this thread.
0 commit comments