Is there any difference between the two implementations ? In my project i am using both Hyper and Tokio crates and I have dependency on both channels.
I don't know about Tokio, but the stdlib mpsc channels are quite slow. Instead of using that, have a look at crossbeam's MPMC channels, which are faster than the stdlib mpsc. Crossbeam's channels also support multiple consumers, to boot.
true, you have just added two more ways for implementing channels.
here i am not talking about stdlib:mpsc but about mpsc implementation provided by tokio and futures crates.
originally I used crossbeam but run into some problems with async/.await. so switched to futures::channel.
I do like the idea of having multiple senders though.
The Tokio channels support async await and you can use
await to wait for an item instead of blocking the thread like both std and crossbeam would do.
futures::channel also support async/.await