Skip to content

Commit

Permalink
Use threaded console, adapt for Windows (ocaml#7906) (ocaml#7927)
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolás Ojeda Bär <n.oje.bar@gmail.com>
Co-authored-by: Nicolás Ojeda Bär <n.oje.bar@gmail.com>
  • Loading branch information
emillon and nojb authored Jun 9, 2023
1 parent a340b80 commit 6665a24
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
9 changes: 9 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
3.8.2 (unreleased)
------------------

- Switch back to threaded console for all systems; fix unresponsive console on
Windows (#7906, @nojb)

3.8.1 (2023-06-05)
------------------

Expand All @@ -13,6 +19,9 @@
- Revert #7415 and #7450 (Resolve `ppx_runtime_libraries` in the target context when
cross compiling) (#7887, fixes #7875, @emillon)

- Fix RPC buffer corruption issues due to multi threading. This issue was only
reproducible with large RPC payloads (#7418)

3.8.0 (2023-05-23)
------------------

Expand Down
2 changes: 1 addition & 1 deletion src/dune_config_file/display.ml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ let console_backend = function
| Simple { status_line; _ } -> (
match status_line with
| false -> Dune_console.Backend.dumb
| true -> Dune_console.Backend.progress)
| true -> Dune_threaded_console.progress ())
3 changes: 2 additions & 1 deletion src/dune_threaded_console/dune_threaded_console.ml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ let make (module Base : S) : (module Dune_console.Backend) =
let start () =
Base.start ();
Dune_engine.Scheduler.spawn_thread @@ fun () ->
ignore (Unix.sigprocmask SIG_UNBLOCK [ Signal.to_int Winch ] : int list);
if not Sys.win32 then
ignore (Unix.sigprocmask SIG_UNBLOCK [ Signal.to_int Winch ] : int list);
let last = ref (Unix.gettimeofday ()) in
let frame_rate = 1. /. 60. in
let cleanup () =
Expand Down

0 comments on commit 6665a24

Please sign in to comment.