Crossbeam – Tools for concurrent programming in Rust(github.com)
github.com
Crossbeam – Tools for concurrent programming in Rust
https://github.com/crossbeam-rs/crossbeam
25 comments
Note that there are plans to integrate crossbeam's channel implementation into the standard library. This won't change the public API but would at least vastly improve the implementation. A similar thing was done with changing the implementation of `HashMap` to be a wrapper around the `hashbrown` library.
Phantastic reading list [0] as well! Big thank you to the authors for curating it!
[0] https://github.com/crossbeam-rs/rfcs/wiki
[0] https://github.com/crossbeam-rs/rfcs/wiki
I wish crossbeam channels added support for async/await
You could use async_channel [1] it provides async multi-producer multi-consumer.
[1]: https://docs.rs/async-channel/latest/async_channel/
[1]: https://docs.rs/async-channel/latest/async_channel/
I'm using flume channels but I'd love to use crossbeam in an async environment
Async/await channels need a completely different implementation. It doesn't really make a ton of sense for a single crate to support both sync/threaded channels and async channels.
Flume channels support both, but yeah those are very different implementations. I think that supporting it in crossbeam would be great too
accountofme(2)
This user is just reposting trending repositories for karma.
See also this similar post: https://www.reddit.com/r/rust/comments/u5edlo/crossbeam_tool...
mr90210(1)
· crossbeam is a building block used in Rayon, which is Rust's main data parallelism library, roughly similar to OpenMP.
· crossbeam channels are very fast. They're in the same league as golang, sometimes faster (depending how you measure of course).
· crossbeam is an order of magnitude faster than channels in the Rust's standard library, while being more powerful and simpler to use. This is an example where experimentation in a 3rd party crate paid off compared to the standard library where a basic implementation went to die.
· it integrates with Rust's borrow checker of course, so you can use complex multi-threaded constructs (e.g. share stack-allocated objects between threads) without fear of data races or use-after-free.