What's the latest state of N:M threads?



I was trying to figure out how N:M threads finally works in Rust 1.0. Only thing I was able to find on the Internet was some statement that libgreen had been removed. My question is how N:M threads are implemented in Rust 1.0.

Thanks, Oliver


There is no support in-tree for N:M threading.


There isnt support anywhere for it. @alexcrichton has a repo but it has not been updated since the removal, basically.


That’s a pitty. Thanks for the information.


Are there any plans for a revival/replacement? CSP aka channels in Go make concurrency so much easier. It’s just amazing. I guess you need real green threads to have “true CSP” compared to libgreen and other frameworks based on asynchronous callbacks.


If it helps there is https://github.com/rustcc/coroutine-rs and https://github.com/carllerche/mio.


Channels are a different feature than N:M threads: http://doc.rust-lang.org/stable/std/sync/mpsc/fn.channel.html and http://doc.rust-lang.org/stable/std/sync/mpsc/fn.sync_channel.html

As @Jexell mentions, there is also async IO in those packages.

Finally, while it’s true CSP is great, Rust makes shared-memory concurrency safe as well: http://blog.rust-lang.org/2015/04/10/Fearless-Concurrency.html