Skip to content

Why is there a separate implementation of mpsc channels #2780

Answered by LucioFranco
NeoLegends asked this question in General
Discussion options

You must be logged in to vote

Hey! There are a couple reasons for why we have not contributed implementations upstream, where the first is a difference in values and goals. Tokio values the ability to iterate quickly and provide a cohesive, batteries-included experience, whereas rust-lang/futures-rs values stability. We'll be more aligned on the "stability" values once Tokio reaches 1.0.

On a technical level, Tokio's synchronization primitives have some improvements we, and our users, found to be useful:

  • The primitives are tested using tokio-rs/loom, which reduces the likelihood of concurrency bugs or data races. Model checking futures with Loom is tracked in rust-lang/futures-rs#1958.
  • The primitives have deep integr…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by NeoLegends
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants