From cc19aa160626f5b957d65f921b4aa58edc5bc614 Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Fri, 7 Jul 2023 17:48:37 +0100 Subject: [PATCH 1/2] Eio_posix: fix update to watched FDs on cancel Reported by Daniel Quernheim. --- lib_eio_posix/sched.ml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib_eio_posix/sched.ml b/lib_eio_posix/sched.ml index 954e15409..95c393047 100644 --- a/lib_eio_posix/sched.ml +++ b/lib_eio_posix/sched.ml @@ -145,6 +145,7 @@ let resume t node = (* Called when poll indicates that an event we requested for [fd] is ready. *) let ready t _index fd revents = + assert (not Poll.Flags.(mem revents pollnval)); if fd == t.eventfd_r then ( clear_event_fd t (* The scheduler will now look at the run queue again and notice any new items. *) @@ -259,6 +260,8 @@ let await_readable t (k : unit Suspended.t) fd = if was_empty then update t waiters fd; Fiber_context.set_cancel_fn k.fiber (fun ex -> Lwt_dllist.remove node; + if Lwt_dllist.is_empty waiters.read then + update t waiters fd; t.active_ops <- t.active_ops - 1; enqueue_failed_thread t k ex ); @@ -275,6 +278,8 @@ let await_writable t (k : unit Suspended.t) fd = if was_empty then update t waiters fd; Fiber_context.set_cancel_fn k.fiber (fun ex -> Lwt_dllist.remove node; + if Lwt_dllist.is_empty waiters.write then + update t waiters fd; t.active_ops <- t.active_ops - 1; enqueue_failed_thread t k ex ); From fc68c00ac68b9eb431f0bbb020e901e667caa1ad Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Sat, 8 Jul 2023 09:18:35 +0100 Subject: [PATCH 2/2] Workaround CI solver limitation This temporarily reverts #542 until the CI supports it. --- eio_windows.opam | 2 +- eio_windows.opam.template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eio_windows.opam b/eio_windows.opam index b1b6b795c..6b620f7de 100644 --- a/eio_windows.opam +++ b/eio_windows.opam @@ -30,4 +30,4 @@ build: [ ] ] dev-repo: "git+https://github.com/ocaml-multicore/eio.git" -available: [os-family = "windows"] +#available: [os-family = "windows"] diff --git a/eio_windows.opam.template b/eio_windows.opam.template index e8e4096c8..888f6d9ab 100644 --- a/eio_windows.opam.template +++ b/eio_windows.opam.template @@ -1 +1 @@ -available: [os-family = "windows"] +#available: [os-family = "windows"]