Skip to content

Commit 8752b08

Browse files
[3.14] gh-91555: add warning to docs about possibility of deadlock/infinite recursion (GH-135954) (GH-135988)
(cherry picked from commit a4625d5)
1 parent ad6c90f commit 8752b08

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
@@ -1059,6 +1059,15 @@ possible, while any potentially slow operations (such as sending an email via
10591059
.. note:: If you are using :mod:`multiprocessing`, you should avoid using
10601060
:class:`~queue.SimpleQueue` and instead use :class:`multiprocessing.Queue`.
10611061

1062+
.. warning::
1063+
1064+
The :mod:`multiprocessing` module uses an internal logger created and
1065+
accessed via :meth:`~multiprocessing.get_logger`.
1066+
:class:`multiprocessing.Queue` will log ``DEBUG`` level messages upon
1067+
items being queued. If those log messages are processed by a
1068+
:class:`QueueHandler` using the same :class:`multiprocessing.Queue` instance,
1069+
it will cause a deadlock or infinite recursion.
1070+
10621071
.. method:: emit(record)
10631072

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

0 commit comments

Comments
 (0)