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 suspension = unit Exn_bt.result -> unit
|
||||||
type task = unit -> unit
|
type task = unit -> unit
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,12 +11,12 @@ let rec read fd buf i len : int =
|
||||||
Moonpool.Private.Suspend_.suspend
|
Moonpool.Private.Suspend_.suspend
|
||||||
{
|
{
|
||||||
handle =
|
handle =
|
||||||
(fun ~ls ~run:_ ~resume sus ->
|
(fun ~run:_ ~resume sus ->
|
||||||
Perform_action_in_lwt.schedule
|
Perform_action_in_lwt.schedule
|
||||||
@@ Action.Wait_readable
|
@@ Action.Wait_readable
|
||||||
( fd,
|
( fd,
|
||||||
fun cancel ->
|
fun cancel ->
|
||||||
resume ~ls sus @@ Ok ();
|
resume sus @@ Ok ();
|
||||||
Lwt_engine.stop_event cancel ));
|
Lwt_engine.stop_event cancel ));
|
||||||
};
|
};
|
||||||
read fd buf i len
|
read fd buf i len
|
||||||
|
|
@ -33,12 +33,12 @@ let rec write_once fd buf i len : int =
|
||||||
Moonpool.Private.Suspend_.suspend
|
Moonpool.Private.Suspend_.suspend
|
||||||
{
|
{
|
||||||
handle =
|
handle =
|
||||||
(fun ~ls ~run:_ ~resume sus ->
|
(fun ~run:_ ~resume sus ->
|
||||||
Perform_action_in_lwt.schedule
|
Perform_action_in_lwt.schedule
|
||||||
@@ Action.Wait_writable
|
@@ Action.Wait_writable
|
||||||
( fd,
|
( fd,
|
||||||
fun cancel ->
|
fun cancel ->
|
||||||
resume ~ls sus @@ Ok ();
|
resume sus @@ Ok ();
|
||||||
Lwt_engine.stop_event cancel ));
|
Lwt_engine.stop_event cancel ));
|
||||||
};
|
};
|
||||||
write_once fd buf i len
|
write_once fd buf i len
|
||||||
|
|
@ -60,12 +60,12 @@ let sleep_s (f : float) : unit =
|
||||||
Moonpool.Private.Suspend_.suspend
|
Moonpool.Private.Suspend_.suspend
|
||||||
{
|
{
|
||||||
handle =
|
handle =
|
||||||
(fun ~ls ~run:_ ~resume sus ->
|
(fun ~run:_ ~resume sus ->
|
||||||
Perform_action_in_lwt.schedule
|
Perform_action_in_lwt.schedule
|
||||||
@@ Action.Sleep
|
@@ Action.Sleep
|
||||||
( f,
|
( f,
|
||||||
false,
|
false,
|
||||||
fun cancel ->
|
fun cancel ->
|
||||||
resume ~ls sus @@ Ok ();
|
resume sus @@ Ok ();
|
||||||
Lwt_engine.stop_event cancel ));
|
Lwt_engine.stop_event cancel ));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -107,8 +107,8 @@ let await_lwt (fut : _ Lwt.t) =
|
||||||
M.Private.Suspend_.suspend
|
M.Private.Suspend_.suspend
|
||||||
{
|
{
|
||||||
handle =
|
handle =
|
||||||
(fun ~ls ~run:_ ~resume sus ->
|
(fun ~run:_ ~resume sus ->
|
||||||
let on_lwt_done _ = resume ~ls sus @@ Ok () in
|
let on_lwt_done _ = resume sus @@ Ok () in
|
||||||
Perform_action_in_lwt.(
|
Perform_action_in_lwt.(
|
||||||
schedule Action.(On_termination (fut, on_lwt_done))));
|
schedule Action.(On_termination (fut, on_lwt_done))));
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -48,12 +48,12 @@ module TCP_client = struct
|
||||||
Moonpool.Private.Suspend_.suspend
|
Moonpool.Private.Suspend_.suspend
|
||||||
{
|
{
|
||||||
handle =
|
handle =
|
||||||
(fun ~ls ~run:_ ~resume sus ->
|
(fun ~run:_ ~resume sus ->
|
||||||
Perform_action_in_lwt.schedule
|
Perform_action_in_lwt.schedule
|
||||||
@@ Action.Wait_writable
|
@@ Action.Wait_writable
|
||||||
( sock,
|
( sock,
|
||||||
fun ev ->
|
fun ev ->
|
||||||
resume ~ls sus @@ Ok ();
|
resume sus @@ Ok ();
|
||||||
Lwt_engine.stop_event ev ));
|
Lwt_engine.stop_event ev ));
|
||||||
};
|
};
|
||||||
true
|
true
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue