Skip to main content
Module

x/rimbu/channel/mod.ts>WaitGroup

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
namespace WaitGroup
Re-export
import { WaitGroup } from "https://deno.land/x/rimbu@1.0.2/channel/mod.ts";

Interfaces

Defines the static WaitGroup API.

interface WaitGroup
Re-export
import { type WaitGroup } from "https://deno.land/x/rimbu@1.0.2/channel/mod.ts";

A WaitGroup is a way to perform fork-join logic in an asynchronous context. It allows a process to create an arbitrary amount of sub-processes, and wait for all of them to finish before continuing.

Methods

add(amount?: number): void

Adds the given amount of processes to the WaitGroup.

done(amount?: number): void

Informs the WaitGroup that a process has completed.

wait(): Promise<void>

Blocks until all the processes in the WaitGroup have completed.

variable WaitGroup
Re-export
import { WaitGroup } from "https://deno.land/x/rimbu@1.0.2/channel/mod.ts";