New submission from Yury Selivanov <yseliva...@gmail.com>:

When asyncio event loop is created in a non-main thread, it needs to initialize 
a so called ChildWatcher for it (a helper object to intercept subprocesses 
exits).  Doing that requires to run code in the main thread.

I propose to add a 'sys.addpendingcall' function that will simply expose the 
already existing Py_AddPendingCall to the pure Python land.

----------
components: Interpreter Core, asyncio
messages: 343897
nosy: asvetlov, vstinner, yselivanov
priority: normal
severity: normal
status: open
title: Add a way to schedule a function to be called from the main thread
versions: Python 3.8, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37088>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to