From c044fb8fc93e4c59c0dfe8c56a3ae0f59cc5aea3 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Fri, 27 Oct 2023 12:26:50 -0400 Subject: [PATCH] tweal to WS pool --- src/ws_pool.ml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/ws_pool.ml b/src/ws_pool.ml index e3b8bb71..ac9f85da 100644 --- a/src/ws_pool.ml +++ b/src/ws_pool.ml @@ -98,7 +98,7 @@ exception Got_task of task type around_task = AT_pair : (t -> 'a) * (t -> 'a -> unit) -> around_task (** How many times in a row do we try to do work-stealing? *) -let steal_attempt_max_retry = 3 +let steal_attempt_max_retry = 2 (** Main loop for a worker thread. *) let worker_thread_ (self : state) (runner : t) (w : worker_state) ~on_exn @@ -157,9 +157,8 @@ let worker_thread_ (self : state) (runner : t) (w : worker_state) ~on_exn | Some task -> run_task task; raise_notrace Exit - | None -> - incr unsuccessful_steal_attempts; - Domain_.relax () + | None -> incr unsuccessful_steal_attempts + (* Domain_.relax () *) done; false with Exit -> true