I couldn't get eio to handle my signals while another fiber is running (even if sleeping). Take this pathological case:
open Eio.Std
let () =
Sys.(
set_signal
sigint
(Signal_handle
(fun i ->
Format.eprintf "handle signal: %d@." i;
exit 0)));
Eio_main.run (fun _env ->
Switch.run (fun sw ->
Fiber.fork ~sw (fun () -> Eio.Time.sleep (Eio.Stdenv.clock _env) 5.)))
You can send ctrl+C to the program while it's running and it won't process it until after 5 seconds (when the eio fiber ends).
Tested on macOS (with eio_luv)