File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -708,14 +708,9 @@ void jl_init_threading(void)
708
708
}
709
709
else {
710
710
// if `--gcthreads` or ENV[NUM_GCTHREADS_NAME] was not specified,
711
- // set the number of mark threads to half of compute threads
711
+ // set the number of mark threads to the number of compute threads
712
712
// and number of sweep threads to 0
713
- if (nthreads <= 1 ) {
714
- jl_n_markthreads = 0 ;
715
- }
716
- else {
717
- jl_n_markthreads = (nthreads / 2 ) - 1 ;
718
- }
713
+ jl_n_markthreads = nthreads - 1 ; // -1 for the master (mutator) thread which may also do marking
719
714
// if `--gcthreads` or ENV[NUM_GCTHREADS_NAME] was not specified,
720
715
// cap the number of threads that may run the mark phase to
721
716
// the number of CPU cores
Original file line number Diff line number Diff line change @@ -388,7 +388,7 @@ let exename = `$(Base.julia_cmd()) --startup-file=no --color=no`
388
388
# --gcthreads
389
389
code = " print(Threads.ngcthreads())"
390
390
cpu_threads = ccall (:jl_effective_threads , Int32, ())
391
- @test (cpu_threads == 1 ? " 1 " : string (div ( cpu_threads, 2 )) ) ==
391
+ @test string (cpu_threads) ==
392
392
read (` $exename --threads auto -e $code ` , String) ==
393
393
read (` $exename --threads=auto -e $code ` , String) ==
394
394
read (` $exename -tauto -e $code ` , String) ==
You can’t perform that action at this time.
0 commit comments