Module async_util

Source
Expand description

A set of async utilities.

Modules§

backoff 🔒
condvar 🔒
condwait 🔒
select 🔒
sleep 🔒
task_group 🔒
timeout 🔒

Structs§

Backoff
Exponential backoff https://en.wikipedia.org/wiki/Exponential_backoff
CondVar
CondVar is an async version of https://doc.rust-lang.org/std/sync/struct.Condvar.html
CondWait
CondWait is a wrapper struct for CondVar with a Mutex boolean flag.
TaskGroup
TaskGroup A group that contains spawned tasks.

Enums§

Either
The return value from the select function, indicating which future completed first.
TaskResult
The result of a spawned task.

Functions§

select
Returns the result of the future that completes first, preferring future1 if both are ready.
sleep
timeout
Waits for a future to complete or times out if it exceeds a specified duration.