TaskScope import { TaskScope } from "destack:async"; Structured owner of spawned tasks. Asynchronous disposal waits for every child before it completes. Cancellation requests are delivered cooperatively at cancellable asynchronous operations. export struct TaskScope { static open(): TaskScope; spawn(body: () => Task): Task; cancel(): void; async asyncDispose(): Promise; drop(): void; } language/library/src/async/task.ds:105:133 Members static open(): TaskScope Open a new task scope. spawn(body: () => Task): Task Spawn one task owned by this scope. cancel(): void Request cancellation of every pending child. async asyncDispose(): Promise Cancel pending children and wait for their cleanup. drop(): void Cancel pending children and detach their cleanup.