Await_in_async.Expertval with_await :
Await_kernel.Terminator.t @ local ->
(f:(Await_kernel.Await.t @ local -> Base.unit) @ once ->
Base.unit) @ localwith_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.unitwith_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.unitthread_safe_spawn execution_context f is Async_kernel_scheduler.thread_safe_enqueue_job execution_context f ().