Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 87dc4d6

Browse files
committed
Issue 14976: Note that the queue module is not designed to protect against reentrancy
1 parent 7b3b3dc commit 87dc4d6

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

Doc/library/queue.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ the first retrieved (operating like a stack). With a priority queue,
2222
the entries are kept sorted (using the :mod:`heapq` module) and the
2323
lowest valued entry is retrieved first.
2424

25+
Internally, the module uses locks to temporarily block competing threads;
26+
however, it is not designed to handle reentrancy within a thread.
2527

2628
The :mod:`queue` module defines the following classes and exceptions:
2729

@@ -186,11 +188,6 @@ Example of how to wait for enqueued tasks to be completed::
186188
t.join()
187189

188190

189-
.. note::
190-
191-
The :mod:`queue` module is not safe for use from :mod:`signal` handlers as
192-
it uses :mod:`threading` locks.
193-
194191
.. seealso::
195192

196193
Class :class:`multiprocessing.Queue`

0 commit comments

Comments
 (0)