Task import { Task } from "destack:async"; Single-consumer asynchronous result on its own fiber. Awaiting a task blocks the current fiber and moves the result out. Cancellation requests are delivered cooperatively at cancellable operations. export class Task { static resolve(value: T): Task; static spawn(body: () => T): Task; static block(task: Task): T; cancel(): void; } language/library/src/async/task.ds:13:72 Members static resolve(value: T): Task Create an already completed task. static spawn(body: () => T): Task Run one body on a fresh fiber and expose its result. static block(task: Task): T Block the current fiber until a task completes, moving the result out. cancel(): void Request cancellation at the next suspension.