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_read;
|
||||||
Unix.set_nonblock _magic_pipe_write;
|
Unix.set_nonblock _magic_pipe_write;
|
||||||
let poll = Poll.create () in
|
let poll = Poll.create () in
|
||||||
{
|
let self =
|
||||||
timer = Timer.create ();
|
{
|
||||||
io_tbl = IO_tbl.create ();
|
timer = Timer.create ();
|
||||||
incoming = B_queue.create ();
|
io_tbl = IO_tbl.create ();
|
||||||
in_poll = A.make false;
|
incoming = B_queue.create ();
|
||||||
poll;
|
in_poll = A.make false;
|
||||||
buf4 = Bytes.create 4;
|
poll;
|
||||||
_magic_pipe_read;
|
buf4 = Bytes.create 4;
|
||||||
_magic_pipe_write;
|
_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) =
|
let push (self : state) (msg : Incoming_msg.t) =
|
||||||
B_queue.push self.incoming msg;
|
B_queue.push self.incoming msg;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
open Common_
|
|
||||||
module Fd = Fd
|
module Fd = Fd
|
||||||
module Timer = Timer
|
module Timer = Timer
|
||||||
module Ev_loop = Ev_loop
|
module Ev_loop = Ev_loop
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue