GVL (Global VM Lock, biyen GIL) ing MRI Ruby mung ngidini siji thread nglaksanakake Ruby code ing wektu kang padha — dadi thread ora nyedhiyakake parallelism CPU sing sejati. Nanging GVL iku dirilis sajrone I/O, dadi thread bener mbantu kanggo I/O-bound work. Kanggo parallelism CPU, sampeyan nggunakake multiple processes. Iki mirroring situasi GIL Python.
GVL: siji thread nglaksanakake Ruby code ing wektu kang padha
MRI (the standard Ruby) has a GLOBAL VM LOCK:
→ only ONE thread executes Ruby code at any instant (no CPU parallelism from threads)
→ BUT the GVL is RELEASED during blocking I/O (network, file, DB)
So: threads help for I/O-bound work, NOT for CPU-bound work.
