[issue31489] Signal delivered to a subprocess triggers parent's handler

Nathaniel Smith report at bugs.python.org
Tue Dec 19 19:25:03 EST 2017


Nathaniel Smith <njs at pobox.com> added the comment:

It might be possible to create ProcessPoolExecutor and get it to spawn all the workers *before* you start the asyncio loop. It looks like ProcessPoolExecutor delays spawning workers until the first piece of work is submitted, but at that point it spawns all of them immediately, so something like this might work:

executor = ProcessPoolExecutor(...)
executor.submit(lambda: None).wait()
with asyncio.get_event_loop() as loop:
    loop.run_until_complete(...)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31489>
_______________________________________


More information about the Python-bugs-list mailing list