Skip to content

Commit

Permalink
Mitigate ocaml/ocaml#11737.
Browse files Browse the repository at this point in the history
  • Loading branch information
mlasson committed Nov 21, 2022
1 parent fa055c3 commit 163638a
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions ocaml-lsp-server/src/dune.ml
Expand Up @@ -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 () ->
Expand Down

0 comments on commit 163638a

Please sign in to comment.