3 ms·
Doesn't Ruby, like Python, have a GIL? I always found that one is enough to encourage some "premature scalable architecture"
by morkalork 1y ago
Doesn't Ruby, like Python, have a GIL? I always found that one is enough to encourage some "premature scalable architecture"
- trevorhinesley 1y agoIt does have a GIL. You’re not wrong, but by that same logic, there’s pitfalls when using multi-threading as well, even in languages where it’s native (e.g., Elixir). Regardless, in my experience, when you run into scenarios that need queueing, multi-threading, etc., you need to know what you’re doing.
- Lio 1y agoThat depends on the Ruby implementation. MRI (CRuby) has a GVL which is why you might use a forking web server like Puma or Pitchfork. JRuby and TruffleRuby though have true multi-threading and no GVL. I’ve used the Concurrent Ruby library with JRuby and Tomcat quite a bit and find works very well for what I need.