mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-06 03:05:30 -05:00
fix build
This commit is contained in:
parent
0605ef4a1e
commit
e0f5b5bbcb
4 changed files with 10 additions and 12 deletions
|
|
@ -1,5 +1,3 @@
|
|||
module A = Atomic_
|
||||
|
||||
type suspension = unit Exn_bt.result -> unit
|
||||
type task = unit -> unit
|
||||
|
||||
|
|
|
|||
|
|
@ -11,12 +11,12 @@ let rec read fd buf i len : int =
|
|||
Moonpool.Private.Suspend_.suspend
|
||||
{
|
||||
handle =
|
||||
(fun ~ls ~run:_ ~resume sus ->
|
||||
(fun ~run:_ ~resume sus ->
|
||||
Perform_action_in_lwt.schedule
|
||||
@@ Action.Wait_readable
|
||||
( fd,
|
||||
fun cancel ->
|
||||
resume ~ls sus @@ Ok ();
|
||||
resume sus @@ Ok ();
|
||||
Lwt_engine.stop_event cancel ));
|
||||
};
|
||||
read fd buf i len
|
||||
|
|
@ -33,12 +33,12 @@ let rec write_once fd buf i len : int =
|
|||
Moonpool.Private.Suspend_.suspend
|
||||
{
|
||||
handle =
|
||||
(fun ~ls ~run:_ ~resume sus ->
|
||||
(fun ~run:_ ~resume sus ->
|
||||
Perform_action_in_lwt.schedule
|
||||
@@ Action.Wait_writable
|
||||
( fd,
|
||||
fun cancel ->
|
||||
resume ~ls sus @@ Ok ();
|
||||
resume sus @@ Ok ();
|
||||
Lwt_engine.stop_event cancel ));
|
||||
};
|
||||
write_once fd buf i len
|
||||
|
|
@ -60,12 +60,12 @@ let sleep_s (f : float) : unit =
|
|||
Moonpool.Private.Suspend_.suspend
|
||||
{
|
||||
handle =
|
||||
(fun ~ls ~run:_ ~resume sus ->
|
||||
(fun ~run:_ ~resume sus ->
|
||||
Perform_action_in_lwt.schedule
|
||||
@@ Action.Sleep
|
||||
( f,
|
||||
false,
|
||||
fun cancel ->
|
||||
resume ~ls sus @@ Ok ();
|
||||
resume sus @@ Ok ();
|
||||
Lwt_engine.stop_event cancel ));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,8 +107,8 @@ let await_lwt (fut : _ Lwt.t) =
|
|||
M.Private.Suspend_.suspend
|
||||
{
|
||||
handle =
|
||||
(fun ~ls ~run:_ ~resume sus ->
|
||||
let on_lwt_done _ = resume ~ls sus @@ Ok () in
|
||||
(fun ~run:_ ~resume sus ->
|
||||
let on_lwt_done _ = resume sus @@ Ok () in
|
||||
Perform_action_in_lwt.(
|
||||
schedule Action.(On_termination (fut, on_lwt_done))));
|
||||
};
|
||||
|
|
|
|||
|
|
@ -48,12 +48,12 @@ module TCP_client = struct
|
|||
Moonpool.Private.Suspend_.suspend
|
||||
{
|
||||
handle =
|
||||
(fun ~ls ~run:_ ~resume sus ->
|
||||
(fun ~run:_ ~resume sus ->
|
||||
Perform_action_in_lwt.schedule
|
||||
@@ Action.Wait_writable
|
||||
( sock,
|
||||
fun ev ->
|
||||
resume ~ls sus @@ Ok ();
|
||||
resume sus @@ Ok ();
|
||||
Lwt_engine.stop_event ev ));
|
||||
};
|
||||
true
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue