diff --git a/base/task.jl b/base/task.jl index 2d0babbb9fd4c..60fbccc64f4e3 100644 --- a/base/task.jl +++ b/base/task.jl @@ -806,7 +806,10 @@ function enq_work(t::Task) tid = 0 end end - ccall(:jl_wakeup_thread, Cvoid, (Int16,), (tid - 1) % Int16) + # nosleep + if tid != 0 + ccall(:jl_wakeup_thread, Cvoid, (Int16,), (tid - 1) % Int16) + end return t end diff --git a/src/partr.c b/src/partr.c index 33631dc83c05a..800e3983f9601 100644 --- a/src/partr.c +++ b/src/partr.c @@ -241,6 +241,8 @@ static int sleep_check_after_threshold(uint64_t *start_cycles) */ if (jl_running_under_rr(0)) return 1; + return 0; + /* nosleep if (!(*start_cycles)) { *start_cycles = jl_hrtime(); return 0; @@ -251,6 +253,7 @@ static int sleep_check_after_threshold(uint64_t *start_cycles) return 1; } return 0; + */ } @@ -318,11 +321,13 @@ JL_DLLEXPORT void jl_wakeup_thread(int16_t tid) JL_NOTSAFEPOINT // in the future, we might want to instead wake some fraction of threads, // and let each of those wake additional threads if they find work int anysleep = 0; + /* nosleep int nthreads = jl_atomic_load_acquire(&jl_n_threads); for (tid = 0; tid < nthreads; tid++) { if (tid != self) anysleep |= wake_thread(tid); } + */ // check if we need to notify uv_run too if (uvlock != ct && anysleep) { jl_fence();