]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue 14976: Note that the queue module is not designed to protect against reentrancy
authorRaymond Hettinger <python@rcn.com>
Fri, 9 Sep 2016 22:57:13 +0000 (15:57 -0700)
committerRaymond Hettinger <python@rcn.com>
Fri, 9 Sep 2016 22:57:13 +0000 (15:57 -0700)
Doc/library/queue.rst

index f80385270be009676034153e6d305d8c9c6cde46..e026e52bbd8fd518a8ba72b23f94f6078ae40a78 100644 (file)
@@ -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`