Ruby's built-in Queue cannot cross Ractor boundaries due to Mutex not being Ractor-shareable, leaving a gap for CPU-bound parallel workloads. The ractor_queue gem (v0.1.0) fills this gap with a bounded, lock-free MPMC queue that is always Ractor.shareable?. Built on a C++ atomic_queue library via Rice bindings and marked

9m read timeFrom madbomber.github.io
Post cover image
Table of contents
The Problem: Ruby’s Queue Cannot Cross Ractor Boundaries #RactorQueue: A Shared Queue That Works Across Ractors #The API #Why Use Ractors? #Patterns for Sophisticated Applications #Validating Shareable Payloads at the Push Site #Blocking Behavior and Interrupts #Performance #Installation #When to Use RactorQueue #

Sort: