[issue37088] Add a way to schedule a function to be called from the main thread

STINNER Victor report at bugs.python.org
Tue Feb 11 18:30:30 EST 2020


STINNER Victor <vstinner at python.org> added the comment:

> NP, here, but, hm, can you unilaterally reject features now? :)

Eric Snow and me are basically against the idea of exposing the "pending calls" mechanism in Python, since it's fragile and dangerous. Andrew Sveltov wrote "@vstinner had objections, perhaps this PR should be rejected." So I don't think that it's an unilaterally decision :)

There are multiple unanswered questions which have been asked here. For example, the ratione to add this feature seems to be based on a wrong assumption (signal handling using the pending call mechanism).

I'm not strongly against the feature. I first proposed to expose it, but make it private. Almost one year later, the PR was not updated. So I just closed the PR and the issue.

The problem is not only asynico, it's how this feature can be abused in general, and users who may have wrong expectations on how it works.


> Yeah, with the new threaded watcher being the default we don't need this anymore.

Handling subprocesses in asyncio also seem to be a can of worms. bpo-38323 is a good example :-(

----------

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


More information about the Python-bugs-list mailing list