@hyperfrontend/state-machine/coordinated-async-operation

coordinated-async-operation

Orchestrator for multiple related async processes, exposing aggregate state across the group.

CoordinatedAsyncProcess wraps a set of AsyncOperation instances and presents them as one unit: lifecycle actions (start, pause, cancel) fan out to every member; selectors (inProgress, done, failed, ...) report the group-level state derived from the constituents. Use this when an application step depends on several async pieces completing together — for example, fetching a record and its related entities — and you want a single object to render against rather than coordinating the individual processes by hand.

API Reference

Classes

§class

CoordinatedAsyncProcess

Coordinates multiple async operations, allowing them to be started, cancelled, or paused together.

Properties

Methods

§cancelAll(): void
§pauseAll(): void
§registerProcess(process: AsyncProcess): CoordinatedAsyncProcess
§startAll(): Promise<void[]>