@@ -275,11 +275,6 @@ var LibraryPThread = {
275
275
err ( 'Thread ' + d [ 'threadId' ] + ': ' + d [ 'text' ] ) ;
276
276
} else if ( cmd === 'alert' ) {
277
277
alert ( 'Thread ' + d [ 'threadId' ] + ': ' + d [ 'text' ] ) ;
278
- } else if ( cmd === 'detachedExit' ) {
279
- #if ASSERTIONS
280
- assert ( worker . pthread ) ;
281
- #endif
282
- PThread . returnWorkerToPool ( worker ) ;
283
278
} else if ( d . target === 'setimmediate' ) {
284
279
// Worker wants to postMessage() to itself to implement setImmediate()
285
280
// emulation.
@@ -307,7 +302,7 @@ var LibraryPThread = {
307
302
worker . on ( 'error' , function ( e ) {
308
303
worker . onerror ( e ) ;
309
304
} ) ;
310
- worker . on ( 'detachedExit ' , function ( ) {
305
+ worker . on ( 'exit ' , function ( ) {
311
306
// TODO: update the worker queue?
312
307
// See: https://github.com/emscripten-core/emscripten/issues/9763
313
308
} ) ;
@@ -816,12 +811,6 @@ var LibraryPThread = {
816
811
return 0 ;
817
812
} ,
818
813
819
- __pthread_detached_exit: function ( ) {
820
- // Called at the end of pthread_exit (which occurs also when leaving the
821
- // thread main function) if an only if the thread is in a detached state.
822
- postMessage ( { 'cmd' : 'detachedExit' } ) ;
823
- } ,
824
-
825
814
// Returns 0 on success, or one of the values -ETIMEDOUT, -EWOULDBLOCK or -EINVAL on error.
826
815
emscripten_futex_wait__deps: [ 'emscripten_main_thread_process_queued_calls' ] ,
827
816
emscripten_futex_wait : function ( addr , val , timeout ) {
0 commit comments