Skip to content

scheduler.py: Prevent the asyncio loop from leaking into subprocesses

Benjamin Schubert requested to merge bschubert/fix-children-termination into master

Description

Having a running asyncio loop while forking a program is not supported in python and doesn't work as expected.

This leads to file descriptors leaking and the subprocesses sharing the same loop as the parents. This also leads to the parent receiving all signals the children receive.

This ensures we don't leek our asyncio loop in the workers we fork.

Validating the change

Benchmarks

Benchmarks for the whole changes can be found on !1692 (merged)

Edited by Benjamin Schubert

Merge request reports