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
- Don't call `exitRuntime()` when `ENVIRONMENT_IS_PTHREAD` is true.
- Only obtain `runtimeKeepaliveCounter` when `EXIT_RUNTIME` is true.
- Remove the early return from `exitRuntime()`.
- Collapse if/else statements in `exit()`.
// if exit() was called explicitly, warn the user if the runtime isn't actually being shut down
118
119
if(keepRuntimeAlive()&&!implicit){
119
-
#if !EXIT_RUNTIME
120
-
varmsg='program exited (with status: '+status+'), but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)';
121
-
#else
120
+
#if EXIT_RUNTIME
122
121
varmsg='program exited (with status: '+status+'), but keepRuntimeAlive() is set (counter='+runtimeKeepaliveCounter+') due to an async operation, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)';
122
+
#else
123
+
varmsg='program exited (with status: '+status+'), but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)';
Copy file name to clipboardExpand all lines: src/worker.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -257,7 +257,7 @@ self.onmessage = (e) => {
257
257
}
258
258
#if ASSERTIONS
259
259
}else{
260
-
// else e == 'unwind', and we should fall through here and keep the pthread alive for asynchronous events.
260
+
// else ex == 'unwind', and we should fall through here and keep the pthread alive for asynchronous events.
261
261
err('Pthread 0x'+Module['_pthread_self']().toString(16)+' completed its main entry point with an `unwind`, keeping the worker alive for asynchronous operation.');
0 commit comments