summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-01-06 16:31:28 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-01-06 16:31:28 (GMT)
commit003428158bc6cb2bcac766b4394d1519172c22cb (patch)
tree3600fdfd6da17133e1f376bf074116d9b6ddf924 /Doc/library
parentf8dc9ca84e112203ddcf4f8499acd65b911bfa80 (diff)
downloadcpython-003428158bc6cb2bcac766b4394d1519172c22cb.zip
cpython-003428158bc6cb2bcac766b4394d1519172c22cb.tar.gz
cpython-003428158bc6cb2bcac766b4394d1519172c22cb.tar.bz2
Elaborate about the GIL.
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/threading.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/Doc/library/threading.rst b/Doc/library/threading.rst
index 371ac90..74c9976 100644
--- a/Doc/library/threading.rst
+++ b/Doc/library/threading.rst
@@ -17,11 +17,23 @@ The :mod:`dummy_threading` module is provided for situations where
methods and functions in this module in the Python 2.x series are still
supported by this module.
+.. impl-detail::
+
+ Due to the :term:`Global Interpreter Lock`, in CPython only one thread
+ can execute Python code at once (even though certain performance-oriented
+ libraries might overcome this limitation).
+ If you want your application to make better of use of the computational
+ resources of multi-core machines, you are advised to use
+ :mod:`multiprocessing` or :class:`concurrent.futures.ProcessPoolExecutor`.
+ However, threading is still an appropriate model if you want to run
+ multiple I/O-bound tasks simultaneously.
+
.. seealso::
Latest version of the :source:`threading module Python source code
<Lib/threading.py>`
+
This module defines the following functions and objects: