@@ -712,7 +712,7 @@ void jl_init_threading(void)
712712 gc_first_tid = nthreads + nthreadsi ;
713713}
714714
715- static uv_barrier_t thread_init_done ;
715+ uv_barrier_t thread_init_done ;
716716
717717void jl_start_threads (void )
718718{
@@ -751,30 +751,20 @@ void jl_start_threads(void)
751751 uv_barrier_init (& thread_init_done , nthreads );
752752
753753 // GC/System threads need to be after the worker threads.
754- int nworker_threads = nthreads - ngcthreads ;
754+ int nmutator_threads = nthreads - ngcthreads ;
755755
756- for (i = 1 ; i < nthreads ; ++ i ) {
756+ for (i = 1 ; i < nmutator_threads ; ++ i ) {
757757 jl_threadarg_t * t = (jl_threadarg_t * )malloc_s (sizeof (jl_threadarg_t )); // ownership will be passed to the thread
758758 t -> tid = i ;
759759 t -> barrier = & thread_init_done ;
760- if (i < nworker_threads ) {
761- uv_thread_create (& uvtid , jl_threadfun , t );
762- if (exclusive ) {
763- mask [i ] = 1 ;
764- uv_thread_setaffinity (& uvtid , mask , NULL , cpumasksize );
765- mask [i ] = 0 ;
766- }
767- }
768- else if (i == nthreads - 1 && jl_n_sweepthreads == 1 ) {
769- uv_thread_create (& uvtid , jl_concurrent_gc_threadfun , t );
770- }
771- else {
772- uv_thread_create (& uvtid , jl_parallel_gc_threadfun , t );
760+ uv_thread_create (& uvtid , jl_threadfun , t );
761+ if (exclusive ) {
762+ mask [i ] = 1 ;
763+ uv_thread_setaffinity (& uvtid , mask , NULL , cpumasksize );
764+ mask [i ] = 0 ;
773765 }
774766 uv_thread_detach (& uvtid );
775767 }
776-
777- uv_barrier_wait (& thread_init_done );
778768}
779769
780770_Atomic(unsigned ) _threadedregion ; // HACK: keep track of whether to prioritize IO or threading
0 commit comments