[HN Gopher] Hyperbridge: Fast multi-producer, multi-consumer unb...
       ___________________________________________________________________
        
       Hyperbridge: Fast multi-producer, multi-consumer unbounded channel
       in Rust
        
       Author : tosh
       Score  : 48 points
       Date   : 2024-02-09 18:20 UTC (4 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | wongarsu wrote:
       | 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.
       | 
       | 1: https://github.com/zesterer/flume
        
         | JoshTriplett wrote:
         | 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.
         | 
         | Highly recommended.
        
       | jitl wrote:
       | 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.
       | 
       | https://github.com/crossbeam-rs/crossbeam/tree/master/crossb...
        
         | Nullabillity wrote:
         | Crossbeam isn't async[0]. It can multiplex with itself (via the
         | `select!` macro), but not with anything else.
         | 
         | [0]: https://github.com/crossbeam-rs/crossbeam/issues/896
        
       | dataangel wrote:
       | Would be great if it had benchmarks
        
       | samsquire wrote:
       | Interesting. Thanks for sharing.
       | 
       | 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.
        
       | eigenrick wrote:
       | 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.
        
       ___________________________________________________________________
       (page generated 2024-02-09 23:01 UTC)