tweal to WS pool

This commit is contained in:
Simon Cruanes 2023-10-27 12:26:50 -04:00
parent 08722691e8
commit c044fb8fc9
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -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