What is wrong with mpsc?

In this thread there are several mentions of mpsc as an example for suboptimal apis in std. Could anyone clarify whats wrong with it?

1 Like

See this description from Alex Crichton. Also, not an API issue per se, but there is this long standing bug which makes its use problematic for many.


As a reference point, have a look at the crossbeam channels. Same API as std::mpsc but apparently it's much faster and has some bugs fixed relative to std::mpsc.

If crossbeam provides the same api would it be possible to integrate the implementation into std? The same happened with hash maps.

This has been suggested, though I'm not quite sure what the current status is.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.