Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/rimbu/channel/custom/index.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.2.0/channel/custom/index.ts";

Interfaces

Defines the static WaitGroup API.

interface WaitGroup
Re-export
import { type WaitGroup } from "https://deno.land/x/rimbu@1.2.0/channel/custom/index.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.2.0/channel/custom/index.ts";