Await_in_asyncSourceval schedule_with_sync :
?monitor:Async.Monitor.t ->
?priority:Async.Priority.t ->
(Await_kernel.Sync.t @ local -> 'a) @ once ->
'a Async.Deferred.tschedule_with_sync ~f schedules f s as a concurrent task to run on the async scheduler with a s : Sync.t that will resume execution of the task after a blocking sync on the async scheduler.
val schedule_with_await :
?monitor:Async.Monitor.t ->
?priority:Async.Priority.t ->
Await_kernel.Terminator.t ->
f:(Await_kernel.Await.t @ local -> 'a) @ once ->
'a Async.Deferred.tschedule_with_await terminator ~f schedules f w as a concurrent task to run on the async scheduler with a w : Await.t that will resume execution of the task after a blocking await on the async scheduler.
val schedule_with_yield :
?monitor:Async.Monitor.t ->
?priority:Async.Priority.t ->
(Await_kernel.Yield.t @ local -> 'a) @ once ->
'a Async.Deferred.tschedule_with_yield ~f schedules f y as a concurrent task to run on the async scheduler with a y : Yield.t that will yield to the async scheduler on calls to Yield.yield
run_with_sync is like schedule_with_sync, except f is started immediately rather than enqueuing onto the async scheduler. run_with_sync must be called within the async scheduler.
val run_with_await :
Await_kernel.Terminator.t ->
f:(Await_kernel.Await.t @ local -> 'a) @ once ->
'a Async.Deferred.trun_with_await is like schedule_with_await, except f is started immediately rather than enqueuing onto the async scheduler. run_with_await must be called within the async scheduler.
await_deferred w deferred awaits until the deferred becomes determined.
non_eager_await_deferred w deferred awaits until the deferred becomes determined. Unlike await_deferred, non_eager_await_deferred always resumes the current task in a new async job, even if deferred is already determined. This is considerably slower than immediately calling Deferred.value_exn, but closer to semantics-preserving with regard to Deferred.bind.