mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-06 03:05:30 -05:00
suspend: provide dummy with_suspend_handler on 4.xx
This commit is contained in:
parent
55b975017f
commit
e94c7999de
2 changed files with 3 additions and 3 deletions
|
|
@ -82,7 +82,7 @@ let prepare_for_await () : Dla_.t =
|
||||||
[@@@ocaml.alert "+unstable"]
|
[@@@ocaml.alert "+unstable"]
|
||||||
[@@@else_]
|
[@@@else_]
|
||||||
|
|
||||||
let[@inline] with_suspend ~on_suspend:_ ~run:_ ~resume:_ f = f ()
|
let[@inline] with_suspend (WSH _) f = f ()
|
||||||
let[@inline] prepare_for_await () = { Dla_.release = ignore; await = ignore }
|
let[@inline] prepare_for_await () = { Dla_.release = ignore; await = ignore }
|
||||||
|
|
||||||
[@@@endif]
|
[@@@endif]
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,8 @@ val suspend : suspension_handler -> unit
|
||||||
and a task runner function.
|
and a task runner function.
|
||||||
*)
|
*)
|
||||||
|
|
||||||
|
[@@@endif]
|
||||||
|
|
||||||
type with_suspend_handler =
|
type with_suspend_handler =
|
||||||
| WSH : {
|
| WSH : {
|
||||||
on_suspend: unit -> 'state;
|
on_suspend: unit -> 'state;
|
||||||
|
|
@ -84,7 +86,5 @@ val with_suspend : with_suspend_handler -> (unit -> unit) -> unit
|
||||||
[resume]. [run] should be used to start other tasks.
|
[resume]. [run] should be used to start other tasks.
|
||||||
*)
|
*)
|
||||||
|
|
||||||
[@@@endif]
|
|
||||||
|
|
||||||
val prepare_for_await : unit -> Dla_.t
|
val prepare_for_await : unit -> Dla_.t
|
||||||
(** Our stub for DLA. Unstable. *)
|
(** Our stub for DLA. Unstable. *)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue