原文
| ||||||||||||||||||
| ||||||||||||||||||
![]() |
原始链接: https://news.ycombinator.com/item?id=43451281
Mike Perham 的 "Ratomic" 库,为 Ruby 的 Ractor 提供了可变数据结构,正在 Hacker News 上引起关注。一位评论者重点提到了一篇 Jean撰写的相关文章(byroot.github.io),该文章讨论了共享数据结构(如队列和并发映射)对于使 Ractor 能够用于完整应用程序的必要性,并提到了 C 扩展能够使其类型可移动的重要性。Atomics 包含 Ractor 安全版本的队列和映射。另一位评论者表达了兴奋之情,并指出他们刚刚阅读了激发该库灵感的文章,并希望有这样的资源,强调了 Atomics 的及时性和价值。这些讨论表明,Ruby 社区对 Ractor 的兴趣和开发正在日益增长。
| ||||||||||||||||||
| ||||||||||||||||||
![]() |
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
reply