| Crates.io | atomic-waitgroup |
| lib.rs | atomic-waitgroup |
| version | 0.1.4 |
| created_at | 2024-05-10 05:16:25.545972+00 |
| updated_at | 2025-11-08 10:10:44.586539+00 |
| description | A waitgroup implementation supports async with advanced features |
| homepage | |
| repository | https://github.com/frostyplanet/atomic-waitgroup-rs/ |
| max_upload_size | |
| id | 1235702 |
| size | 71,002 |
A waitgroup support async with advanced features, implemented with atomic operations to reduce locking in mind.
document: https://docs.rs/atomic-waitgroup/latest/atomic_waitgroup/
wait_to() is supported to wait for a value larger than zero.
wait() & wait_to() can be canceled by tokio::time::timeout or futures::select!.
Assumes only one thread calls wait(). If multiple concurrent wait() is detected, will panic for this invalid usage.
done() & wait() is allowed to called concurrently.
add() & done() is allowed to called concurrently.
Assumes add() & wait() are in the same thread.