]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-91555: add warning to docs about possibility of deadlock/infinite recursion...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 26 Jun 2025 14:26:11 +0000 (16:26 +0200)
committerGitHub <noreply@github.com>
Thu, 26 Jun 2025 14:26:11 +0000 (15:26 +0100)
(cherry picked from commit a4625d597f9fc2d083fbb9c22d3ffcec73b2061a)

Doc/library/logging.handlers.rst

index b48c5cb483dcceeb48b2b6169fb6c2ad596b80f8..c587052ae9a4a000b1d053bface6627e20ac3c3a 100644 (file)
@@ -1052,6 +1052,15 @@ possible, while any potentially slow operations (such as sending an email via
    .. note:: If you are using :mod:`multiprocessing`, you should avoid using
       :class:`~queue.SimpleQueue` and instead use :class:`multiprocessing.Queue`.
 
+   .. warning::
+
+      The :mod:`multiprocessing` module uses an internal logger created and
+      accessed via :meth:`~multiprocessing.get_logger`.
+      :class:`multiprocessing.Queue` will log ``DEBUG`` level messages upon
+      items being queued. If those log messages are processed by a
+      :class:`QueueHandler` using the same :class:`multiprocessing.Queue` instance,
+      it will cause a deadlock or infinite recursion.
+
    .. method:: emit(record)
 
       Enqueues the result of preparing the LogRecord. Should an exception