mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-05 19:00:33 -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 _fiber =
|
||||
Fiber.spawn_top ~name:"Moonpool_lwt.main" ~on:runner (fun () ->
|
||||
Fiber.spawn_top ~on:runner (fun () ->
|
||||
try
|
||||
let x = f () in
|
||||
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 fut =
|
||||
M.Fut.spawn ~name:"tcp.server.handler" ~on:runner (fun () ->
|
||||
handler client_addr ic oc)
|
||||
M.Fut.spawn ~on:runner (fun () -> handler client_addr ic oc)
|
||||
in
|
||||
|
||||
let lwt_fut = lwt_of_fut fut in
|
||||
lwt_fut)
|
||||
in
|
||||
Printf.printf "awaiting server\n%!";
|
||||
let s = await_lwt server in
|
||||
Printf.printf "got server\n%!";
|
||||
s
|
||||
await_lwt server
|
||||
|
||||
let shutdown self = await_lwt @@ Lwt_io.shutdown_server self
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue