Registry / async / waitgroup

waitgroup

JSON →
library0.1.2rscratesunverified

Async waitgroup for a collection of tasks to finish.

# Cargo.toml [dependencies] waitgroup = "0.1.2"
INSTALL
IMPORT
SIG · WAITGROUP
W
waitgroup
asyncrustv0.1.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

WaitGroup
use waitgroup::WaitGroup;

Creates a WaitGroup, spawns tasks that each drop a clone, and awaits completion.

use waitgroup::WaitGroup; let wg = WaitGroup::new(); for _ in 0..5 { let wg = wg.clone(); tokio::spawn(async move { // do work drop(wg); }); } wg.wait().await;
Debug
Known issues
gotchaRequires an async runtime (e.g., tokio) to work.
fix
Add tokio as a dependency and use `#[tokio::main]` or similar.
affects: >=0.1.0
Upgrade
Version history
0.1.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
48 hits · last 30 days
node
44
Amazon
1
Resources
waitgroup — cargo add waitgroup · libregistry