mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
[3.13] gh-91555: add warning to docs about possibility of deadlock/infinite recursion (GH-135954) (GH-135989)
(cherry picked from commit a4625d597f
)
This commit is contained in:
parent
a7246323a2
commit
3be3c496df
1 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue