One of the major feature of Ruby 3.0 is the introduction of ‘ractor’. Ractor is a new concurrent abstraction for Ruby. Unlike Ruby threads, ractors can run in parallel. Due to the Ruby Global Virtual Machine Lock(GVL), even each Ruby thread is mapped to native thread, there can only be one active thread running. But after the introduction of ractor, there can be multiple GVL, each ractor has one. That’s why ractors can have parallel execution.
In 2015, Pragtob wrote a blog post about Ruby meta programming. Well, you may wonder why I’m talking about a blog that wrote five years ago while the computer science is progressing at ever-increasing speed. I searched for it, because in work we were hit by this problem.