issue #414: reinitialize service pool lock on fork

issue510
David Wilson 5 years ago
parent 9d9add3339
commit 1119f24071

@ -298,6 +298,10 @@ Core Library
was configured. This would lead to connection timeouts due to the hung
response.
* `#414 <https://github.com/dw/mitogen/issues/414>`_,
`#425 <https://github.com/dw/mitogen/issues/425>`_: avoid deadlock of forked
children by reinitializing the :mod:`mitogen.service` pool lock.
* `#416 <https://github.com/dw/mitogen/issues/416>`_: around 1.4KiB of memory
was leaked on every RPC, due to a list of strong references keeping alive any
handler ever registered for disconnect notification.

@ -85,6 +85,10 @@ def on_fork():
mitogen.core.Latch._on_fork()
mitogen.core.Side._on_fork()
mitogen__service = sys.modules.get('mitogen.service')
if mitogen__service:
mitogen__service._pool_lock = threading.Lock()
def handle_child_crash():
"""

Loading…
Cancel
Save