DEV Community

Discussion on: Ruby's GIL in a nutshell

Collapse
naixspirit profile image
Spirit

I think it's not a type, the main thread is also a thread

Collapse
tomlobato profile image
Antonio Alberto Lobato • Edited on

Of course, the main thread is a... thread, but how that matters for the issue?
Any line of code that runs synchronously forces the next line to wait. So, we need a Thread.new, just to let the interpreter to reach the next line while the first one is running.