r/ruby • u/Edthal01 • 2d ago
Question GVL and concurrent programming
Ruby cannot perform real concurrent processing on multicore microprocessors without using ractors because of the GVL. It will only simulate multiple simultaneous processes with threads, queues, mutexes, etc. in a single processor core, no true parallel processing. How does this limitation affect true parallel programming in Ruby, that is, how much more complicated is it in producing true multicore parallel programming? I am still working on learning Ruby and this is part of my self-inflicted learning process in parallel with Huw Collingworth Book of Ruby.
View all comments
6
u/CaptainKabob 2d ago
For your learning: you're describing C Ruby. JRuby does not have such limitations.
I think it's useful to learn why C Ruby has these limitations (ie the C) and also look at how other language runtimes, like Go, handle it (briefly, they have the same limitations, but structure their language features around them differently).
Also, on a social level, this is a topic where there are plenty of hot takes. And people are tired.