File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -30,4 +30,4 @@ build: [
3030 ]
3131]
3232dev-repo: "git+https://github.com/ocaml-multicore/eio.git"
33- available: [os-family = "windows"]
33+ # available: [os-family = "windows"]
Original file line number Diff line number Diff line change 1- available: [os-family = "windows"]
1+ # available: [os-family = "windows"]
Original file line number Diff line number Diff line change @@ -145,6 +145,7 @@ let resume t node =
145145
146146(* Called when poll indicates that an event we requested for [fd] is ready. *)
147147let ready t _index fd revents =
148+ assert (not Poll.Flags. (mem revents pollnval));
148149 if fd == t.eventfd_r then (
149150 clear_event_fd t
150151 (* 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 =
259260 if was_empty then update t waiters fd;
260261 Fiber_context. set_cancel_fn k.fiber (fun ex ->
261262 Lwt_dllist. remove node;
263+ if Lwt_dllist. is_empty waiters.read then
264+ update t waiters fd;
262265 t.active_ops < - t.active_ops - 1 ;
263266 enqueue_failed_thread t k ex
264267 );
@@ -275,6 +278,8 @@ let await_writable t (k : unit Suspended.t) fd =
275278 if was_empty then update t waiters fd;
276279 Fiber_context. set_cancel_fn k.fiber (fun ex ->
277280 Lwt_dllist. remove node;
281+ if Lwt_dllist. is_empty waiters.write then
282+ update t waiters fd;
278283 t.active_ops < - t.active_ops - 1 ;
279284 enqueue_failed_thread t k ex
280285 );
You can’t perform that action at this time.
0 commit comments