Skip to content

Commit ea90c63

Browse files
committed
Address review comments
1 parent ab85ec9 commit ea90c63

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/postamble.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,9 @@ function exit(status, implicit) {
449449
function procExit(code) {
450450
EXITSTATUS = code;
451451
if (!keepRuntimeAlive()) {
452+
#if USE_PTHREADS
453+
PThread.terminateAllThreads();
454+
#endif
452455
#if expectToReceiveOnModule('onExit')
453456
if (Module['onExit']) Module['onExit'](code);
454457
#endif

tests/test_core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2325,7 +2325,7 @@ def test_pthread_dispatch_after_exit(self):
23252325

23262326
@node_pthreads
23272327
def test_pthread_atexit(self):
2328-
# Test whether we can terminate a running thread during atexit.
2328+
# Test to ensure threads are still running when atexit-registered functions are called
23292329
self.set_setting('EXIT_RUNTIME')
23302330
self.set_setting('PTHREAD_POOL_SIZE', 1)
23312331
self.do_run_in_out_file_test('pthread/test_pthread_atexit.c')

0 commit comments

Comments
 (0)