File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,7 @@ let resume t node =
145
145
146
146
(* Called when poll indicates that an event we requested for [fd] is ready. *)
147
147
let ready t _index fd revents =
148
+ assert (not Poll.Flags. (mem revents pollnval));
148
149
if fd == t.eventfd_r then (
149
150
clear_event_fd t
150
151
(* 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 =
259
260
if was_empty then update t waiters fd;
260
261
Fiber_context. set_cancel_fn k.fiber (fun ex ->
261
262
Lwt_dllist. remove node;
263
+ if Lwt_dllist. is_empty waiters.read then
264
+ update t waiters fd;
262
265
t.active_ops < - t.active_ops - 1 ;
263
266
enqueue_failed_thread t k ex
264
267
);
@@ -275,6 +278,8 @@ let await_writable t (k : unit Suspended.t) fd =
275
278
if was_empty then update t waiters fd;
276
279
Fiber_context. set_cancel_fn k.fiber (fun ex ->
277
280
Lwt_dllist. remove node;
281
+ if Lwt_dllist. is_empty waiters.write then
282
+ update t waiters fd;
278
283
t.active_ops < - t.active_ops - 1 ;
279
284
enqueue_failed_thread t k ex
280
285
);
You can’t perform that action at this time.
0 commit comments