missing subscription in ev loop (for the magic pipe)

This commit is contained in:
Simon Cruanes 2024-03-13 00:22:07 -04:00
parent b57ccc5142
commit 9a26914c9f
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4
2 changed files with 17 additions and 11 deletions

View file

@ -156,16 +156,23 @@ module Main_loop = struct
Unix.set_nonblock _magic_pipe_read;
Unix.set_nonblock _magic_pipe_write;
let poll = Poll.create () in
{
timer = Timer.create ();
io_tbl = IO_tbl.create ();
incoming = B_queue.create ();
in_poll = A.make false;
poll;
buf4 = Bytes.create 4;
_magic_pipe_read;
_magic_pipe_write;
}
let self =
{
timer = Timer.create ();
io_tbl = IO_tbl.create ();
incoming = B_queue.create ();
in_poll = A.make false;
poll;
buf4 = Bytes.create 4;
_magic_pipe_read;
_magic_pipe_write;
}
in
(* make sure we subscribe to readiness of the notification pipe *)
IO_tbl.add_io_wait self.io_tbl self.poll self._magic_pipe_read Read
(Handle.fresh H_read) (IO_wait.make ignore);
self
let push (self : state) (msg : Incoming_msg.t) =
B_queue.push self.incoming msg;

View file

@ -1,4 +1,3 @@
open Common_
module Fd = Fd
module Timer = Timer
module Ev_loop = Ev_loop