From 64ed0d47f17c298ceaad117ff74ef97b6d3eaea0 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Wed, 18 Nov 2020 13:26:19 -0800 Subject: [PATCH 1/2] Replace Unix.select with Unix.sleepf select had no arguments, so it's the same as a sleep. Signed-off-by: Rudi Grinberg --- src/dune_engine/scheduler.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dune_engine/scheduler.ml b/src/dune_engine/scheduler.ml index a0b69a99898..13e92ac0d5f 100644 --- a/src/dune_engine/scheduler.ml +++ b/src/dune_engine/scheduler.ml @@ -477,7 +477,7 @@ end = struct let wait_win32 () = while not (wait_nonblocking_win32 ()) do Mutex.unlock mutex; - ignore (Unix.select [] [] [] 0.001); + Unix.sleepf 0.001; Mutex.lock mutex done From 3cc37246cdedf585234ffaa83f70af80e8c9ac6f Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Wed, 18 Nov 2020 14:55:05 -0800 Subject: [PATCH 2/2] Use Thread.delay instead of sleepf for consistency Signed-off-by: Rudi Grinberg --- src/dune_engine/scheduler.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dune_engine/scheduler.ml b/src/dune_engine/scheduler.ml index 13e92ac0d5f..c7ec3fcaf16 100644 --- a/src/dune_engine/scheduler.ml +++ b/src/dune_engine/scheduler.ml @@ -477,7 +477,7 @@ end = struct let wait_win32 () = while not (wait_nonblocking_win32 ()) do Mutex.unlock mutex; - Unix.sleepf 0.001; + Thread.delay 0.001; Mutex.lock mutex done