You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The GIL is variously referred to as "global lock", "interpreter lock",
"global interpreter lock", "GIL", and simply "the lock". Given the
infamy of the GIL, one might expect all of these to be equally clear.
But as someone coding to this API for the first time, I had plenty to
learn already and the need to ensure that all of these referred to the
same singleton was distracting.
This documentation begins, "The Python interpreter is not fully thread
safe. In order to support multi-threaded Python programs, there's a
global lock that must be held by the current thread before it can safely
access Python objects. Without the lock..."
My suggestion is to alter the second sentence to the following:
"Without this lock (called the global interpreter lock, or GIL for
short)...."
All subsequent documentation references to "interpreter lock", "global
interpreter lock", and "lock" should be changed to "GIL". It would be
nice if the API referred to it consistently (e.g. PyEval_AcquireLock()
versus PyGILState_Ensure()) but that would require an interface change
which is obviously out of the question.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: