Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-39671: Clarify semantics of asyncio.wait with FIRST_COMPLETED/EXCEPTION #21918

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

embray
Copy link
Contributor

@embray embray commented Aug 18, 2020

I had a couple (potential) bugs due to the assumption that when using return_when=FIRST_COMPLETED or return_when=FIRST_EXCEPTION the done set would contain only the first completed future.

I did however become suspicious that this may not be the case, and indeed it is not. I wouldn't claim that this behavior is inconsistent with how the function is already documented, but I think it would be helpful to clarify this.

https://bugs.python.org/issue39671

I had a couple (potential) bugs due to the assumption that when using `return_when=FIRST_COMPLETED` or `return_when=FIRST_EXCEPTION` the `done` set would contain only the first completed future.

I did however become suspicious that this may not be the case, and indeed it is not.  I wouldn't claim that this behavior is inconsistent with how the function is already documented, but I think it would be helpful to clarify this.
@embray embray requested review from 1st1 and asvetlov as code owners Aug 18, 2020
@bedevere-bot bedevere-bot added docs Documentation in the Doc dir awaiting review labels Aug 18, 2020
@tirkarthi
Copy link
Member

tirkarthi commented Aug 25, 2020

This seems to be related to https://bugs.python.org/issue39671

@embray
Copy link
Contributor Author

embray commented Aug 31, 2020

Ah, I didn't see that issue. Thanks for pointing it out.

@embray embray changed the title Clarify semantics of asyncio.wait with FIRST_COMPLETED/EXCEPTION bpo-39671: Clarify semantics of asyncio.wait with FIRST_COMPLETED/EXCEPTION Aug 31, 2020
@cpython-cla-bot
Copy link

cpython-cla-bot bot commented Sep 20, 2022

The following commit authors need to sign the Contributor License Agreement:

Click the button to sign:
CLA not signed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants