bpo-37137, asyncio: add BaseEventLoop.wait_executor_on_close#13786
bpo-37137, asyncio: add BaseEventLoop.wait_executor_on_close#13786vstinner merged 1 commit intopython:masterfrom vstinner:asyncio_block_on_close
Conversation
|
About the overall idea, Yury Selivanov wrote:
|
Add BaseEventLoop.wait_executor_on_close attribute: true by default. loop.close() now waits for the default executor to finish by default. Set loop.wait_executor_on_close attribute to False to not wait for the executor.
|
I used git commit --amend to fix the bpo number: https://bugs.python.org/issue34037 is the right issue with a better history. |
|
I support the idea but have a question about implementation. @vstinner if you agree I can prepare a PR. |
|
First of all, I wrote this PR to attempt to fix https://bugs.python.org/issue37137 Sadly and surprisingly (for me), it didn't fix https://bugs.python.org/issue37137 We might simply revert this change later if needed. I'm just trying to get green buildbots to be able to release beta1.
For me, it's more an implementation detail. I don't think that it should belong to the abstract class. A completely different implementation can decide to not implement this attribute.
This attribute is a dummy boolean, I don't see which kind of extra code you should like to execute when the attribute is set or get. But it's more up to you :-) |
|
asyncio explicitly supports Technically there is a possibility to write default ( That's why I think this is a part of the public API. |
|
I don't like this last minute api decision. Please don't merge this. |
See my previous comment. https://bugs.python.org/issue37137 is blocking Python 3.8 beta1 release. I tried 2 fixes, but it sounds like Andrew found the root issue: https://bugs.python.org/issue37137#msg344488 Once beta1 will be released, we can revert other attempts to fix https://bugs.python.org/issue37137 |
…ythonGH-13786)" This reverts commit 0f0a30f.
…ythonGH-13786)" (python#13802) This reverts commit 0f0a30f.
…H-13786) Add BaseEventLoop.wait_executor_on_close attribute: true by default. loop.close() now waits for the default executor to finish by default. Set loop.wait_executor_on_close attribute to False to not wait for the executor.
…ythonGH-13786)" (python#13802) This reverts commit 0f0a30f.
Add BaseEventLoop.wait_executor_on_close attribute: true by default.
loop.close() now waits for the default executor to finish by default.
Set loop.wait_executor_on_close attribute to False to not wait for
the executor.
https://bugs.python.org/issue37137