Global Interpreter Lock
This lesson discusses the global interpreter lock, also known as GIL and its effects.
We'll cover the following...
Global Interpreter Lock
The global interpreter lock or GIL for short, is a limitation in the MRI Ruby interpreter that allows for only one thread to execute at any given time. Unlike C# or Java, which are truly multithreaded, Ruby can only run a single thread when multiple cores are available. Note that only the standard Ruby MRI implementation suffers from the GIL restriction. Another well known programming language with GIL limitation is the CPython interpreter.
Reasons for GIL
The reason to have GIL is that of Ruby users too. But more importantly, it eliminates race conditions for Ruby developers, although it does not completely ...