From 163638a969b9d194bcfc12a1054333b841067a75 Mon Sep 17 00:00:00 2001 From: Marc Lasson Date: Mon, 21 Nov 2022 15:46:41 +0000 Subject: [PATCH] Mitigate ocaml/ocaml#11737. --- ocaml-lsp-server/src/dune.ml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ocaml-lsp-server/src/dune.ml b/ocaml-lsp-server/src/dune.ml index 04171e9e7..344a266df 100644 --- a/ocaml-lsp-server/src/dune.ml +++ b/ocaml-lsp-server/src/dune.ml @@ -818,11 +818,14 @@ let run_loop t = match !t with | Closed -> Fiber.return None | Active active -> - let* state = poll active state in - (* TODO make this a bit more dynamic. if poll completes fast, wait more, - if it's slow, then wait less *) - let+ () = Lev_fiber.Timer.sleepf 0.25 in - Some state) + if Sys.win32 then + Fiber.return None + else + let* state = poll active state in + (* TODO make this a bit more dynamic. if poll completes fast, wait more, + if it's slow, then wait less *) + let+ () = Lev_fiber.Timer.sleepf 0.25 in + Some state) let run t : unit Fiber.t = Fiber.of_thunk (fun () ->