summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2016-09-09 22:57:13 (GMT)
committerRaymond Hettinger <python@rcn.com>2016-09-09 22:57:13 (GMT)
commit87dc4d61890b4ed1c74b1f5e7256b3aa2080a499 (patch)
tree546d75d9753a8228b865efcd9d2ab0d96995ef24
parent7b3b3dc85da3ec176d7fd7caa546298c232c9c0a (diff)
downloadcpython-87dc4d61890b4ed1c74b1f5e7256b3aa2080a499.zip
cpython-87dc4d61890b4ed1c74b1f5e7256b3aa2080a499.tar.gz
cpython-87dc4d61890b4ed1c74b1f5e7256b3aa2080a499.tar.bz2
Issue 14976: Note that the queue module is not designed to protect against reentrancy
-rw-r--r--Doc/library/queue.rst7
1 files changed, 2 insertions, 5 deletions
diff --git a/Doc/library/queue.rst b/Doc/library/queue.rst
index f803852..e026e52 100644
--- a/Doc/library/queue.rst
+++ b/Doc/library/queue.rst
@@ -22,6 +22,8 @@ the first retrieved (operating like a stack). With a priority queue,
the entries are kept sorted (using the :mod:`heapq` module) and the
lowest valued entry is retrieved first.
+Internally, the module uses locks to temporarily block competing threads;
+however, it is not designed to handle reentrancy within a thread.
The :mod:`queue` module defines the following classes and exceptions:
@@ -186,11 +188,6 @@ Example of how to wait for enqueued tasks to be completed::
t.join()
-.. note::
-
- The :mod:`queue` module is not safe for use from :mod:`signal` handlers as
- it uses :mod:`threading` locks.
-
.. seealso::
Class :class:`multiprocessing.Queue`