3 ms·
Ratomic: Provides Mutable data structures for use with Ruby's Ractors
- rco8786 2y agoWow awesome. I read the article that inspired this yesterday and thought to myself, "wow, a library of Ractor-safe data structures would be awesome" (and even left a comment: https://news.ycombinator.com/item?id=43477929 https://news.ycombinator.com/item?id=43477929) and now here we are.
- jeremy_k 2y agoProbably worth linking to https://byroot.github.io/ruby/performance/2025/02/27/whats-the-deal-with-ractors.html https://byroot.github.io/ruby/performance/2025/02/27/whats-t... in which Jean goes into further detail about some of nuances that go into building these types of data structures. In particular it is mentioned "For Ractors to be viable to run a full-on application in, Ruby would need to provide at least a few basic data structures that would be shareable across ractors, so that we can implement useful constructs like connection pools. Perhaps some Ractor::Queue, maybe even some Ractor::ConcurrentMap, and more importantly, C extensions would need to be able to make their types movable." Which we see in Mike's library he has started work on a Queue and a Map. I haven't fully wrapped my head around all the nuances to using Ractors nor have I tried to do anything with them yet. But its encouraging to see the discussion around them ramping up