Expand description
Parallel async tasks and async task runners.
§Crate
This crate is part of the zng
project.
§Cargo Features
This crate provides 4 feature flags, 0 enabled by default.
§"deadlock_detection"
Enables parking_lot deadlock detection.
§"ipc"
Enables ipc tasks.
Only enables in cfg(not(any(target_os = "android", target_arch = "wasm32", target_os = "ios")))
builds.
§"http"
Enables http tasks.
§"test_util"
Enabled by doc tests.
Re-exports§
pub use parking_lot;
pub use rayon;
Modules§
- Async channels.
- Async filesystem primitives.
- HTTP client.
- IO tasks.
- IPC tasks.
Macros§
- A future that zips other futures.
- A future that is ready when all futures are ready with an
Ok(T)
result or any future is ready with anErr(E)
result. - A future that is ready when all futures are ready with
Some(T)
or when any is future ready withNone
. - A future that awaits for the first future that is ready.
- A future that waits for the first future that is ready with an
Ok(T)
result. - A future that is ready when any of the futures is ready and
Some(T)
.
Structs§
- Deadline APP integration.
- Error when
with_deadline
reach a time limit before a task finishes. - A
Waker
that dispatches a wake call to multiple other wakers. - Parallel iterator adapter the propagates the thread context.
- Status update about a task progress.
- Represents a fork-join scope which can be used to spawn any number of tasks that run in the caller’s thread context.
- A future that will await until
set
is called. - Represents a
Future
running in sync with the UI.
Traits§
- Extends rayon’s
ParallelIterator
with thread context.
Functions§
- Blocks the thread until the
task
future finishes. - A future that is
Pending
until thedeadline
is reached. - Executor used in async doc tests.
- Implements a
Future
from a closure. - Rayon join with local context.
- Rayon join context with local context.
- Polls the
task
once immediately on the calling thread, if thetask
is ready returns the response already set, if thetask
is pending continues execution likerespond
. - Polls the
task
once immediately on the calling thread, if thetask
is pending, continues execution inspawn
. - Spawn a parallel async task that will send its result to a
ResponseVar<R>
. - Spawn a parallel async task that can also be
.await
for the task result. - Like
run
but catches panics. - Rayon scope with local context.
- Spawn a parallel async task, this function is not blocking and the
task
starts executing immediately. - Fire and forget a
wait
task. Thetask
starts executing immediately. - Continuous poll the
task
until if finishes. - Create a parallel
task
that blocks awaiting for an IO operation, thetask
starts on the first.await
. - Like
wait
but catches panics. - Like
spawn_wait
, but the task will send its result to aResponseVar<R>
. - Add a
deadline
to a future. - A future that is
Pending
once and wakes the current task.