join
Runs two futures concurrently and completes with both outputs, once both are done.
Both are polled on every wake-up, so they make progress together on one task; neither is
started twice or dropped early. It needs no runtime, so it works with block_on
or any executor.
Import
Section titled “Import”Cargo feature future (enabled by default). To compile only this module:
or in Cargo.toml:
Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
a | A | The first future. |
b | B | The second future. |
Returns
Section titled “Returns”impl Future<Output = (A::Output, B::Output)> — A future for (output of a, output of b).
