Hi May I ask the design tradeoff for channel, why it's mpsc, spsc should also work nicely, does it against single writer principle?
A multi-producer channel is more powerful than a single-producer channel.
When the sender is not cloned it does use an efficient SPSC implementation underneath I believe, and it can dynamically switch implementations on the fly.
If you're after efficiency, then you should use:
Despite being mpmc, it's way faster than std in all cases, even when used with just one producer and one consumer.
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.