Within our send_example() function:
- On lines 13 through 15, we set up three oneshot channels.
- On lines 20 through 23 we use futures::stream::futures_ordered, which will convert a list (any IntoIterator value) of futures into a Stream yielding results on a first in, first out (FIFO) basis. If any underlying futures do not complete before the next future is invoked, this function will wait until the long-running future has been completed and will then internally re-sort that future into its proper order.
- Line 25 shows us that we can push additional futures into the futures_ordered iterator separately.
- Line 28 demonstrates another function that doesn't rely on sorting on a FIFO basis, called futures::stream::futures_unordered. This function will have better performance than its counterpart futures_ordered, but for our example, we are not sending enough values to make a difference.
- On lines 31 through 33 we send values to our channels, mimicking the process of returning...