bpo-37088: Add the sys.addpendingcall() function.#13656
bpo-37088: Add the sys.addpendingcall() function.#136561st1 wants to merge 1 commit intopython:masterfrom
Conversation
asvetlov
left a comment
There was a problem hiding this comment.
I like it but we need more reviewers I guess
|
@vstinner what do you think? |
asvetlov
left a comment
There was a problem hiding this comment.
The more I think the more I like it.
addpendingcall() is obviously the very low-level API but it can help asyncio a lot for initialization event loop policies and SIGCHLD handling on Linux.
Python allows subscribing on a signal from the main thread only.
asyncio has on-demand initialization strategy for loops and policies.
So, if I want to use asyncio from sub-thread only and want to execute subprocesses a way to execute some code in main thread if I'm now in sub-thread context the feature is pretty cool.
|
This looked like it was ready to be merged, maybe pending some comments from the bug tracker. @1st1, what do you think? |
|
@vstinner had objections, perhaps this PR should be rejected. |
|
There is not clear rationale to justify the additon of the function, so I reject the feature. If you are still interesting by the function, please elaborate the rationale in https://bugs.python.org/issue37088 |
https://bugs.python.org/issue37088