File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -449,6 +449,9 @@ function exit(status, implicit) {
449
449
function procExit ( code ) {
450
450
EXITSTATUS = code ;
451
451
if ( ! keepRuntimeAlive ( ) ) {
452
+ #if USE_PTHREADS
453
+ PThread . terminateAllThreads ( ) ;
454
+ #endif
452
455
#if expectToReceiveOnModule ( 'onExit' )
453
456
if ( Module [ 'onExit' ] ) Module [ 'onExit' ] ( code ) ;
454
457
#endif
Original file line number Diff line number Diff line change @@ -2325,7 +2325,7 @@ def test_pthread_dispatch_after_exit(self):
2325
2325
2326
2326
@node_pthreads
2327
2327
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
2329
2329
self .set_setting ('EXIT_RUNTIME' )
2330
2330
self .set_setting ('PTHREAD_POOL_SIZE' , 1 )
2331
2331
self .do_run_in_out_file_test ('pthread/test_pthread_atexit.c' )
You can’t perform that action at this time.
0 commit comments