fix build, remove some debug

This commit is contained in:
Simon Cruanes 2024-02-14 21:16:55 -05:00
parent bd00e0838a
commit 36c6e8e900
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4
2 changed files with 3 additions and 7 deletions

View file

@ -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))

View file

@ -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