The repository seems abandoned; or maybe complete?
At work we use flume, which is another capable multi-producer, multi-consumer async-capable channel [1]. It's great for shuffling data between threads, as well as between async tasks, and between threads and async tasks. Basically any time you want to pieces of code to exchange data or signals without pesky shared state.
I use flume as well, and it works very well. In particular, I often use it in contexts where one end of the channel is in an async task and the other end is in a sync thread.
Why use this or Flume over the crossbeam multi-producer multi-consumer channel [1]? I thought crossbeam was well-regarded and pretty much the unofficial standard library for this sort of thing.
Because queues have blocking operations, like getting the next item when it's available, or putting in the next item as soon as there's space in a bounded queue. But if your code is async you can't block the whole thread, you want your queue to block in an async way (well, you could wrap all blocking calls in tokio::task::spawn_blocking, but that's not ergonomic)
I am in early stages of writing a low latency barrier which provides low latency lock free communication between thread pairs ( 1 thread bidirectionally with 1 other thread ) but wiring up to other barriers is proving difficult.
The number of sent messages doesn't match the number of received messages I think I need a mutex unfortunately
So it's interesting that there is options in this space in Rust.
I'm curious what the motivation was for linking this now. This repo hasn't been updated in two years. Meanwhile, there are at least five other Rust MPMC queues in use that have been recently updated.
Is there something unique about its algorithm? I'm afraid the repo is low on documentation.
16 comments
[ 2.7 ms ] story [ 61.8 ms ] threadAt work we use flume, which is another capable multi-producer, multi-consumer async-capable channel [1]. It's great for shuffling data between threads, as well as between async tasks, and between threads and async tasks. Basically any time you want to pieces of code to exchange data or signals without pesky shared state.
1: https://github.com/zesterer/flume
Highly recommended.
Not a common thing in web development.
https://github.com/crossbeam-rs/crossbeam/tree/master/crossb...
[0]: https://github.com/crossbeam-rs/crossbeam/issues/896
I am in early stages of writing a low latency barrier which provides low latency lock free communication between thread pairs ( 1 thread bidirectionally with 1 other thread ) but wiring up to other barriers is proving difficult.
The number of sent messages doesn't match the number of received messages I think I need a mutex unfortunately
So it's interesting that there is options in this space in Rust.
Is there something unique about its algorithm? I'm afraid the repo is low on documentation.