flume
crossbeam
Our great sponsors
- InfluxDB - Collect and Analyze Billions of Data Points in Real Time
- Onboard AI - Learn any GitHub repo in 59 seconds
- SaaSHub - Software Alternatives and Reviews
flume | crossbeam | |
---|---|---|
13 | 40 | |
1,983 | 6,489 | |
- | 1.8% | |
0.0 | 0.0 | |
2 months ago | 4 days ago | |
Rust | Rust | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
flume
- pub/sub Event bus in rust
-
Is there any part of the Standard Library that really impresses you?
I also like flume, it has impressive performance (although not the best). More importantly, it's written only with safe rust. https://github.com/zesterer/flume
-
appreciating fearless concurrency
The most commonly suggested replacement for mspc is crossbeam-channel; flume is also relatively popular.
-
Rust has a small standard library (and that's ok)
It's not officially deprecated, but the alternatives on crates.io are considered better. flume and crossbeam-channel feature less unsafe code and offer better performance. Benchmarks.
-
Why are so many important features not in standard library yet?
it's slow (checkout flume's benchmarks for example)
-
A mini-Erlang/Elixir -- tell me if/why my idea sucks
For concurrency/parallelism, you launch at most 2 * CPU Cores, PIN them and use a fast broker to spread the task (like a ring buffer or an MPSC). But you keep linear scan, tight loops, SIMD friendly data, on each. You are not switching context that much, and instead, bet you will process the batch fast. (CPUs are fast today!)
- Whats your favourite open source Rust project that needs more recognition?
-
PlaintDB Serves - another milestone reached
First, I was becoming more and more confident that the channel library Daxpedda and I fell in love with, flume, was misbehaving, but I couldn't seem to reproduce it outside of the massive PliantDB codebase. I finally called up Daxpedda on Discord and screen shared my debugging session, showing him how the tests succeeded if I retained a channel. If I allowed the sender to drop after successfully sending, sometimes the tests would fail. He agreed, something was odd. It took me a while, but I finally whittled it down to about 30 lines of code and reported the issue. In an amazingly quick fashion, the maintainer fixed the issue and released an update. And for the record, I still fully love and recommend this library if you're mixing async and non-async code using channels. It's a wonderful implementation.
-
single-producer single-consumer concurrent queue
Sort of? Here's the closest thing you'll probably find: https://crates.io/crates/flume
-
Hey Rustaceans! Got an easy question? Ask here (6/2021)!
My first try was with flume, which uses a single producer, multi-consumer setup, and while it compiles and runs, it's magnitudes slower than the serial version. Here's a psuedocode rendition:
crossbeam
-
Where can I read about how to write a safe API for unsafe code?
Shooting from the hip, crossbeam might be a good candidate for understanding the thread safety aspects of Rust. I kind of feel like this is probably "too big" of a project if you're just learning, but I can't think of something smaller off the top of my head that would be suitable.
-
crossbeam VS scalable-concurrent-containers - a user suggested alternative
2 projects | 13 Apr 2023
-
Rust Tips and Tricks #PartOne
The crossbeam crate offers a powerful alternative to standard channels with support for the Select operation, timeouts, and more.
- This implementation is actually unsafe since we don't check if the index is in-bounds. But this is fine since this is only used internally.
-
Rust vs Go
Deadlocks and leaks are easy as other languages.
- Help with package licensing issues
-
Kanal: Channels 80x faster than the standard library!
Ouch, didn’t know about https://github.com/crossbeam-rs/crossbeam/issues/821, thanks for pointing that out, that’s a big update for me!
-
Hey Rustaceans! Got a question? Ask here! (21/2022)!
The last option I can think of is using two threads (like above) and epoch GC instead of a lock (i.e. using crossbeam-epoch). But I don't have enough experience with this to say anything about it.
-
what are the resources for writing multi threaded programs in rust
You should definitely look at the Rayon crate. After I figured that out, my productivity vs multi threaded C was exponentially better (literally did many days of equivalent C work in less than an hour). Rayon is focused on data processing, other multi threaded stuff can benefit from other crates like crossbeam (Channels, scoped threads), and tokio (async networking).
- Audio Libraries Considered Challenging
What are some alternatives?
rayon - Rayon: A data parallelism library for Rust
tokio - A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...
rust-threadpool - A very simple thread pool for parallel task execution
RxRust - The Reactive Extensions for the Rust Programming Language
coroutine-rs - Coroutine Library in Rust
Bus Writer - Single-reader, multi-writer & single-reader, multi-verifier; broadcasts reads to multiple writeable destinations in parallel
dashmap - Blazing fast concurrent HashMap for Rust.
libfringe - a Rust library implementing safe, lightweight context switches, without relying on kernel services
flapigen-rs - Tool for connecting programs or libraries written in Rust with other languages
uniffi-rs - a multi-language bindings generator for rust
rust - Empowering everyone to build reliable and efficient software.
rust - Rust for the xtensa architecture. Built in targets for the ESP32 and ESP8266