async fn with_task_group(async (TaskGroup) -> Unit) -> Unitpub(all) suberror BreakFromSpawnLoopimpl Show for TimeoutErrorimpl Show for TimerCancelledtype Lazy[X]type Mutexpub(all) enum RetryMethod {
Immediate
FixedDelay(Int)
ExponentialDelay(initial~ : Int, factor~ : Double, maximum~ : Int)
}type Task[X]type TaskGroupfn TaskGroup::spawn_loop(self : TaskGroup, f : async () -> Unit, no_wait? : Bool, allow_failure? : Bool, retry? : RetryMethod, max_retry? : Int, fatal_error? : (Error) -> Bool) -> Unitpub struct Timer {
duration : Int
// private fields
}async fn[X] handle_cancellation(f : async () -> X) -> X?fn is_being_cancelled() -> Boolfn now() -> Int64async fn pause() -> Unit noraiseasync fn[X] protect_from_cancel(f : async () -> X) -> X nocancelasync fn[X] retry(strategy : RetryMethod, max_retry? : Int, fatal_error? : (Error) -> Bool, f : async () -> X) -> Xasync fn sleep(duration : Int) -> Unit noraiseasync fn[X] with_timeout(time : Int, f : async () -> X, error? : Error) -> Xasync fn[X] with_timeout_opt(time : Int, f : async () -> X) -> X?Install
Installed by default