pub fn select<St1, St2>(stream1: St1, stream2: St2) -> Select<St1, St2>
where
    St1: Stream,
    St2: Stream<Item = St1::Item>,
{
    fn round_robin(last: &mut PollNext) -> PollNext {
        last.toggle()
    }

    assert_stream::<St1::Item, _>(Select {
        inner: select_with_strategy(stream1, stream2, round_robin),
    })
}
This function will attempt to pull items from both streams. Each
stream will be polled in a round-robin fashion, and whenever a stream is
ready to yield an item that item is yielded.

After one of the two input streams completes, the remaining one will be
polled exclusively. The returned stream completes when both input
streams have completed.

Note that this function consumes both streams and returns a wrapped
version of them.

## Examples

```rust
# futures::executor::block_on(async {
use futures::stream::{ repeat, select, StreamExt };

let left = repeat(1);
let right = repeat(2);

let mut out = select(left, right);

for _ in 0..100 {
// We should be alternating.
assert_eq!(1, out.select_next_some().await);
assert_eq!(2, out.select_next_some().await);
}
# });
```
futures-util/src/stream/select.rs