mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-06 11:15:38 -05:00
fix build, remove some debug
This commit is contained in:
parent
bd00e0838a
commit
36c6e8e900
2 changed files with 3 additions and 7 deletions
|
|
@ -143,7 +143,7 @@ let main_with_runner ~runner (f : unit -> 'a) : 'a =
|
||||||
let lwt_fut, lwt_prom = Lwt.wait () in
|
let lwt_fut, lwt_prom = Lwt.wait () in
|
||||||
|
|
||||||
let _fiber =
|
let _fiber =
|
||||||
Fiber.spawn_top ~name:"Moonpool_lwt.main" ~on:runner (fun () ->
|
Fiber.spawn_top ~on:runner (fun () ->
|
||||||
try
|
try
|
||||||
let x = f () in
|
let x = f () in
|
||||||
Perform_action_in_lwt.schedule (Action.Wakeup (lwt_prom, x))
|
Perform_action_in_lwt.schedule (Action.Wakeup (lwt_prom, x))
|
||||||
|
|
|
||||||
|
|
@ -15,17 +15,13 @@ module TCP_server = struct
|
||||||
let oc = IO_out.of_unix_fd @@ Lwt_unix.unix_file_descr client_sock in
|
let oc = IO_out.of_unix_fd @@ Lwt_unix.unix_file_descr client_sock in
|
||||||
|
|
||||||
let fut =
|
let fut =
|
||||||
M.Fut.spawn ~name:"tcp.server.handler" ~on:runner (fun () ->
|
M.Fut.spawn ~on:runner (fun () -> handler client_addr ic oc)
|
||||||
handler client_addr ic oc)
|
|
||||||
in
|
in
|
||||||
|
|
||||||
let lwt_fut = lwt_of_fut fut in
|
let lwt_fut = lwt_of_fut fut in
|
||||||
lwt_fut)
|
lwt_fut)
|
||||||
in
|
in
|
||||||
Printf.printf "awaiting server\n%!";
|
await_lwt server
|
||||||
let s = await_lwt server in
|
|
||||||
Printf.printf "got server\n%!";
|
|
||||||
s
|
|
||||||
|
|
||||||
let shutdown self = await_lwt @@ Lwt_io.shutdown_server self
|
let shutdown self = await_lwt @@ Lwt_io.shutdown_server self
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue