Module Await_in_async.Expert

val with_await : Await_kernel.Terminator.t @ local -> (f:(Await_kernel.Await.t @ local -> Base.unit) @ once -> Base.unit) @ local

with_await terminator ~f runs f w as a fiber with a w : Await.t that will resume execution of the fiber after a blocking await on the async scheduler. with_await may return as soon as the first blocking await in f w is encountered.

val with_yield : f:(Await_kernel.Yield.t @ local -> Base.unit) @ once -> Base.unit

with_yield ~f runs f w with a w : Yield.t that will yield to the async scheduler .

val thread_safe_spawn : Async.Execution_context.t -> (Base.unit -> Base.unit) @ once -> Base.unit

thread_safe_spawn execution_context f is Async_kernel_scheduler.thread_safe_enqueue_job execution_context f ().