8000 [3.13] gh-91555: add warning to docs about possibility of deadlock/in… · python/cpython@3be3c49 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3be3c49

Browse files
[3.13] gh-91555: add warning to docs about possibility of deadlock/infinite recursion (GH-135954) (GH-135989)
(cherry picked from commit a4625d5)
1 parent a724632 commit 3be3c49

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Doc/library/logging.handlers.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,6 +1052,15 @@ possible, while any potentially slow operations (such as sending an email via
10521052
.. note:: If you are using :mod:`multiprocessing`, you should avoid using
10531053
:class:`~queue.SimpleQueue` and instead use :class:`multiprocessing.Queue`.
10541054

1055+
.. warning::
1056+
1057+
The :mod:`multiprocessing` module uses an internal logger created and
1058+
accessed via :meth:`~multiprocessing.get_logger`.
1059+
:class:`multiprocessing.Queue` will log ``DEBUG`` level messages upon
1060+
items being queued. If those log messages are processed by a
1061+
:class:`QueueHandler` using the same :class:`multiprocessing.Queue` instance,
1062+
it will cause a deadlock or infinite recursion.
1063+
10551064
.. method:: emit(record)
10561065

10571066
Enqueues the result of preparing the LogRecord. Should an exception

0 commit comments

Comments
 (0)
0