Module indigo::future[][src]

Utilities for working with futures and async logic.

Macros

join

Waits for all given futures to complete and returns their outputs as a tuple.

race

Waits for one of the given futures to complete and then returns the output.

unblock

Runs blocking code on a thread pool.

Structs

Join

A future that waits for both of two futures to complete.

PollFn

Future for the poll_fn() function.

Race

A future that waits for one of two futures to complete.

Enums

Buffered

A buffered future that separates polling from consuming the output value.

Poll

Indicates whether a value is available or if the current task has been scheduled to receive a wakeup instead.

Traits

Future

A future represents an asynchronous computation.

Functions

buffered

Returns a buffered future that separates polling from consuming the output value.

delay

Waits for a given duration of time to elapse.

join

Returns a future that waits for both of two futures to complete.

never

Waits indefinitely.

pending

Waits indefinitely for a value of type T.

poll_fn

Creates a future from a function returning Poll.

race

Returns a future that waits for one of two futures to complete.

unblock

Runs blocking code on a thread pool.