Module completion::future [−][src]
Utilities for the CompletionFuture
trait.
Unlike the futures crate, all the joining futures (functions like
zip
, race
, zip_all
, etc) in this module adopt an efficient polling strategy, where
they only poll the futures that issued wakeups, instead of polling every single future whenever
just one of them issues a wakeup. This reduces their complexity from O(n^2)
to O(n)
, making
them suitable for large numbers of futures.
Re-exports
pub use core::future::pending; |
pub use core::future::ready; |
pub use core::future::Pending; |
pub use core::future::Ready; |
pub use completion_core::CompletionFuture; |
Structs
CatchUnwind | std Future for |
NowOrNever | Future for |
Race | std Future for |
RaceAll | std Future for |
RaceOk | std Future for |
RaceOkAll | std Future for |
RaceOkAllErrors | std An iterator over the errors of the futures in a |
TryZip | std Future for |
TryZipAll | std Future for |
TryZipAllOutput | std An iterator over the successful outputs of futures in a |
Zip | std Future for |
ZipAll | std Future for |
ZipAllOutput | std An iterator over the outputs of futures in a |
Traits
CompletionFutureExt | Extension trait for |
FutureExt | Extension trait for converting |
Functions
block_on | std Blocks the current thread on a completion future. |
race | std Wait for the first future in a tuple to complete. |
race_all | std Wait for the first future in an iterator to complete. |
race_ok | std Wait for the first future in a tuple to successfully complete. |
race_ok_all | std Wait for the first future in an iterator to successfully complete. |
try_zip | std Wait for all the futures in a tuple to successfully complete or one to return an error. |
try_zip_all | std Wait for all the futures in an iterator to successfully complete or one to return an error. |
zip | std Wait for all the futures in a tuple to complete. |
zip_all | std Wait for all the futures in an iterator to complete. |
Type Definitions
BoxCompletionFuture | alloc A type-erased completion future. |
LocalBoxCompletionFuture | alloc A type-erased completion future that cannot be send across threads. |