3 ms·
> dreadful concurrency model (I will never voluntarily go back to async/await after working in Golang), Rust supports golang style message-passing concurrency
by skeptrune 2y ago
> dreadful concurrency model (I will never voluntarily go back to async/await after working in Golang),
Rust supports golang style message-passing concurrency if you want it[1]. I'd argue Rust mpsc channels are actually more powerful than Golang's and add richness to message-passing concurrency modeling.
[1]: https://doc.rust-lang.org/book/ch16-02-message-passing.html https://doc.rust-lang.org/book/ch16-02-message-passing.html
- kelnos 2y agoYeah, I don't get the hate here. Rust's channels are just as powerful as Go's, and there are even implementations of them in the futures crate that implement the Future trait, so you can await on them and effectively get the same behavior as "blocking" on a channel in a goroutine, without having a bunch of blocking native threads.
- lossolo 2y ago> I'd argue Rust mpsc channels are actually more powerful than Golang's Do they support Go select functionality, buffered channels etc without using 3rd party libraries?
- super_flanker 2y agoWhat's wrong with using 3rd party library? Can golang stop you from using a channel when it's consumed/closed?