mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-06 03:05:30 -05:00
feat: add Moonpool.yield on ocaml 5
a mere alias to Picos.Fiber.yield
This commit is contained in:
parent
ed0eda226c
commit
b46a048401
2 changed files with 8 additions and 1 deletions
|
|
@ -16,6 +16,7 @@ let spawn_on_current_runner = Fut.spawn_on_current_runner
|
||||||
[@@@ifge 5.0]
|
[@@@ifge 5.0]
|
||||||
|
|
||||||
let await = Fut.await
|
let await = Fut.await
|
||||||
|
let yield = Picos.Fiber.yield
|
||||||
|
|
||||||
[@@@endif]
|
[@@@endif]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -76,10 +76,16 @@ val get_current_runner : unit -> Runner.t option
|
||||||
[@@@ifge 5.0]
|
[@@@ifge 5.0]
|
||||||
|
|
||||||
val await : 'a Fut.t -> 'a
|
val await : 'a Fut.t -> 'a
|
||||||
(** Await a future. See {!Fut.await}.
|
(** Await a future, must be run on a moonpool runner. See {!Fut.await}.
|
||||||
Only on OCaml >= 5.0.
|
Only on OCaml >= 5.0.
|
||||||
@since 0.5 *)
|
@since 0.5 *)
|
||||||
|
|
||||||
|
|
||||||
|
val yield : unit -> unit
|
||||||
|
(** Yield from the current task, must be run on a moonpool runner.
|
||||||
|
Only on OCaml >= 5.0.
|
||||||
|
@since NEXT_RELEASE *)
|
||||||
|
|
||||||
[@@@endif]
|
[@@@endif]
|
||||||
|
|
||||||
module Lock = Lock
|
module Lock = Lock
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue