7 comments

  • scottlamb 4 hours ago
    > Disclaimer: An earlier version of this post claimed the structure is wait-free, this is incorrect. Being wait-free requires that failure or suspension of any thread can’t cause failure or suspension of another thread. This queue in fact does not fulfill that requirement. The main section which discusses the wait bounds of queue operations has been amended to reflect this, but other parts of this article have not been. As such there may parts of the text which refer to this as a wait-free queue, which it is not. I chose to keep those sections to avoid rewriting chunks of this post after it was already posted. Thanks for the correction Reddit user matthieum!

    Classy disclaimer! matthieum's (long) reddit comment is also an informative read: https://www.reddit.com/r/rust/comments/1up0uhg/girls_just_wa...

    • RossBencina 3 hours ago
      Thanks. I jumped at the headline. I'd be happy with wait-free MPSC. I haven't checked in for a while. Have there been any breakthroughs in low-complexity wait-free queues in the past 10 years?
  • rigtorp 1 hour ago
    Here's my widely used implementation of this approach in C++: https://github.com/rigtorp/MPMCQueue
  • duttish 2 hours ago
    On the topic of lock free data structures I found this one on a SPSC very interesting too https://david.alvarezrosa.com/posts/optimizing-a-lock-free-r... taking it from 12M to 305M ops/s
  • RossBencina 3 hours ago
    Perhaps I missed it but there didn't appear to be discussion of false sharing between the N individual data slots. It might be beneficial to pad each slot to a cache line width (or at least less slots per line), and/or using some kind of bijective hashing on the slot lookup so that sequential tickets don't access adjacent slots.
  • nttylock 3 hours ago
    [flagged]
  • 37738484 1 hour ago
    [dead]
  • throw8384949 3 hours ago
    Title sounds like auto translated title for spicy Japanese movie (sorry, just honest feedback).

    Agent had several comments (even on recent repo). I wrote much worse code, good for research project, but I would pass. The post is from march 2026 though.

    Perhaps add more disclaimers about limitations. Or add section to explain most common agent comments.

    • mohamedkoubaa 1 minute ago
      Go away
    • dmoy 2 hours ago
      It's a play on the classic pop hit song "Girls Just Wanna Have Fun"
      • cubefox 42 minutes ago
        It's also a joke because girls definitely don't care about "Fast MPMC Queues with Bounded Waiting" at all. We can estimate the HN audience to be ≈95% male.
    • Blackthorn 2 hours ago
      Why should anyone care what comments your agent has on code?
    • bigfishrunning 2 hours ago
      > Or add section to explain most common agent comments.

      Shouldn't your agent explain its own comments? why would the author of a fast queue care what your agent says?

      • throw74838484 2 hours ago
        Because it would not even pass initial code review for most developers. Most people use short review prompt, with yes/no answers.

        Imagine the code compilers (or some analysis tool) gives several concurrency and memory warnings. It has easy workaround (just annotate strange code, with links to explanations that this is workaround for low level bugs).

        I am too tired of shitty "safe" Rust code, with 'unsafe' section around every library call (not case here, just an example)! Be clear with that, it takes 15 minutes and 10 cents!

        This project could have correct concurrent code and design, but around much narrower definitions. But most people will not go too deep with review to find it!

        • groby_b 17 minutes ago
          This project was likely not written just to be convenient for you.

          And if it's got value for you, hey, it's open source. Spend the 15 minutes and 10 cents, it's a bargain.

        • brcmthrowaway 2 hours ago
          How to get access to your agent?