mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-05 19:00:33 -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"]
|
||||
[@@@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 }
|
||||
|
||||
[@@@endif]
|
||||
|
|
|
|||
|
|
@ -63,6 +63,8 @@ val suspend : suspension_handler -> unit
|
|||
and a task runner function.
|
||||
*)
|
||||
|
||||
[@@@endif]
|
||||
|
||||
type with_suspend_handler =
|
||||
| WSH : {
|
||||
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.
|
||||
*)
|
||||
|
||||
[@@@endif]
|
||||
|
||||
val prepare_for_await : unit -> Dla_.t
|
||||
(** Our stub for DLA. Unstable. *)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue