mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-06 03:05:30 -05:00
missing subscription in ev loop (for the magic pipe)
This commit is contained in:
parent
b57ccc5142
commit
9a26914c9f
2 changed files with 17 additions and 11 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
open Common_
|
||||
module Fd = Fd
|
||||
module Timer = Timer
|
||||
module Ev_loop = Ev_loop
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue