Eric Snow <ericsnowcurren...@gmail.com> added the comment:

Note that I'm working on making pending calls per-interpreter (see issue #33608 
and https://github.com/python/cpython/pull/12360 (since reverted)).

As to exposing Py_AddPendingCall() as sys.addpendingcall, that might be opening 
a can of worms.  Injecting code into the eval loop at some arbitrary ("soon") 
future time requires care and the code isn't well exercised historically (much 
like subinterpreters).  By making it easier to use the pending calls API (e.g. 
from Python code) we may be introducing an attractive nuisance.  It also adds 
burden on other Python implementations.

My point is, let's think this through before adding sys.addpendingcall(). :)  
Is there another way this could be done that doesn't open a can of worms?

Also, at the very least it should probably be a "private" function (i.e 
sys._addpendingcall).

----------
nosy: +eric.snow

_______________________________________
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