summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-05-17 19:13:45 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2012-05-17 19:13:45 (GMT)
commit79341e7865db69ec4f056c7d274aec06bf58a16f (patch)
tree73c00b1e76b14276e8737bde38bea51829e4de80
parent62110c769f9681c7a747d3e136759937222edc7d (diff)
downloadcpython-79341e7865db69ec4f056c7d274aec06bf58a16f.zip
cpython-79341e7865db69ec4f056c7d274aec06bf58a16f.tar.gz
cpython-79341e7865db69ec4f056c7d274aec06bf58a16f.tar.bz2
Add a mention of the new import locks in whatsnew.
-rw-r--r--Doc/whatsnew/3.3.rst17
1 files changed, 17 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.3.rst b/Doc/whatsnew/3.3.rst
index 6fb60af..fe1a84a 100644
--- a/Doc/whatsnew/3.3.rst
+++ b/Doc/whatsnew/3.3.rst
@@ -573,6 +573,23 @@ Some smaller changes made to the core Python language are:
.. XXX mention new error messages for passing wrong number of arguments to functions
+A Finer-Grained Import Lock
+===========================
+
+Previous versions of CPython have always relied on a global import lock.
+This led to unexpected annoyances, such as deadlocks when importing a module
+would trigger code execution in a different thread as a side-effect.
+Clumsy workarounds were sometimes employed, such as the
+:c:func:`PyImport_ImportModuleNoBlock` C API function.
+
+In Python 3.3, importing a module takes a per-module lock. This correctly
+serializes importation of a given module from multiple threads (preventing
+the exposure of incompletely initialized modules), while eliminating the
+aforementioned annoyances.
+
+(contributed by Antoine Pitrou in :issue:`9260`.)
+
+
New and Improved Modules
========================