mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-10 13:14:05 -05:00
wip
This commit is contained in:
parent
a19106d74e
commit
a2a0e3d306
2 changed files with 2 additions and 9 deletions
|
|
@ -209,18 +209,11 @@ module Ev_loop = struct
|
|||
let reads, writes = IO_tbl.prepare_select self.io_tbl in
|
||||
A.set self.in_blocking_section true;
|
||||
let reads, writes, _ =
|
||||
Tracing_.message
|
||||
(Printf.sprintf "select: %d read (+selfpipe), %d writes"
|
||||
(List.length reads) (List.length writes));
|
||||
let@ _sp = Tracing_.with_span "moonpool-unix.evloop.select" in
|
||||
Unix.select (self.pipe_read :: reads) writes [] delay
|
||||
in
|
||||
A.set self.in_blocking_section false;
|
||||
|
||||
Tracing_.message
|
||||
(Printf.sprintf "select: %d read ready, %d writes ready"
|
||||
(List.length reads) (List.length writes));
|
||||
|
||||
drain_pipe_ self;
|
||||
IO_tbl.handle_ready ~ignore_read:self.pipe_read self.io_tbl reads writes;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@ let main ~port ~j () : unit =
|
|||
|
||||
let@ _main_runner = MU.main in
|
||||
Trace.set_thread_name "main";
|
||||
Printf.printf "IN MAIN\n%!";
|
||||
Trace.message "foo1";
|
||||
|
||||
let@ server =
|
||||
MU.TCP_server.with_server ~runner (MU.Sockaddr.any port)
|
||||
|
|
@ -41,6 +39,8 @@ let main ~port ~j () : unit =
|
|||
(MU.Sockaddr.show @@ MU.TCP_server.endpoint server));
|
||||
Printf.printf "listening on %s\n%!"
|
||||
(MU.Sockaddr.show @@ MU.TCP_server.endpoint server);
|
||||
|
||||
Trace.message "awaiting server";
|
||||
MU.TCP_server.await server;
|
||||
()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue