@@ -99,9 +99,10 @@ Glossary
9999 See :pep: `343 `.
100100
101101 CPython
102- The canonical implementation of the Python programming language. The
103- term "CPython" is used in contexts when necessary to distinguish this
104- implementation from others such as Jython or IronPython.
102+ The canonical implementation of the Python programming language, as
103+ distributed on `python.org <http://python.org >`_. The term "CPython"
104+ is used when necessary to distinguish this implementation from others
105+ such as Jython or IronPython.
105106
106107 decorator
107108 A function returning another function, usually applied as a function
@@ -258,16 +259,25 @@ Glossary
258259 See :term: `global interpreter lock `.
259260
260261 global interpreter lock
261- The lock used by Python threads to assure that only one thread
262- executes in the :term: `CPython ` :term: `virtual machine ` at a time.
263- This simplifies the CPython implementation by assuring that no two
264- processes can access the same memory at the same time. Locking the
265- entire interpreter makes it easier for the interpreter to be
266- multi-threaded, at the expense of much of the parallelism afforded by
267- multi-processor machines. Efforts have been made in the past to
268- create a "free-threaded" interpreter (one which locks shared data at a
269- much finer granularity), but so far none have been successful because
270- performance suffered in the common single-processor case.
262+ The mechanism used by the :term: `CPython ` interpreter to assure that
263+ only one thread executes Python :term: `bytecode ` at a time.
264+ This simplifies the CPython implementation by making the object model
265+ (including critical built-in types such as :class: `dict `) implicitly
266+ safe against concurrent access. Locking the entire interpreter
267+ makes it easier for the interpreter to be multi-threaded, at the
268+ expense of much of the parallelism afforded by multi-processor
269+ machines.
270+
271+ However, some extension modules, either standard or third-party,
272+ are designed so as to release the GIL when doing computationally-intensive
273+ tasks such as compression or hashing. Also, the GIL is always released
274+ when doing I/O.
275+
276+ Past efforts to create a "free-threaded" interpreter (one which locks
277+ shared data at a much finer granularity) have not been successful
278+ because performance suffered in the common single-processor case. It
279+ is believed that overcoming this performance issue would make the
280+ implementation much more complicated and therefore costlier to maintain.
271281
272282 hashable
273283 An object is *hashable * if it has a hash value which never changes during
0 commit comments