Message386112
Playing with this a bit more, I found a weird workaround. By adding the following to the top of worker_sync(), Experiment 1 produces the expected result.
def worker_sync():
async def clear_asyncio_signal_handlers():
loop = asyncio.get_event_loop()
loop.add_signal_handler(signal.SIGINT, signal.SIG_IGN)
asyncio.run(clear_asyncio_signal_handlers())
if WORKER_SIGNAL_HANDLER is WorkerSignalHandler.NONE:
[...]
FYI, this did *not* work (the outcome is still the same for Experiment 1):
def worker_sync():
loop = asyncio.get_event_loop()
loop.add_signal_handler(signal.SIGINT, signal.SIG_IGN)
if WORKER_SIGNAL_HANDLER is WorkerSignalHandler.NONE:
[...]
Maybe this all can be flagged as "as designed". However, perhaps it could be documented? |
|
Date |
User |
Action |
Args |
2021-02-01 20:57:38 | selimb | set | recipients:
+ selimb, asvetlov, yselivanov |
2021-02-01 20:57:38 | selimb | set | messageid: <1612213058.31.0.316074698838.issue43064@roundup.psfhosted.org> |
2021-02-01 20:57:38 | selimb | link | issue43064 messages |
2021-02-01 20:57:38 | selimb | create | |
|