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

Fix race condition on stream.read #535

Merged
merged 2 commits into from Nov 22, 2019
Merged

Conversation

florimondmanca
Copy link
Member

@florimondmanca florimondmanca commented Nov 17, 2019

Fixes #527

Turns out that the bug was also present on trio, so I added a fix and test for it too.

I'm not sure that we'd also need a lock around the asyncio write operation (we already have one on trio), but no bug was reported yet and we should probably investigate that separately anyway.

@florimondmanca florimondmanca added http/2 Issues and PRs related to HTTP/2 concurrency Issues related to concurrency and usage of async libraries labels Nov 17, 2019
@florimondmanca florimondmanca requested a review from a team November 17, 2019 11:39
Copy link
Contributor

@yeraydiazdiaz yeraydiazdiaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a minor nit. Thanks! 🌟

tests/concurrency.py Outdated Show resolved Hide resolved
@florimondmanca
Copy link
Member Author

Thanks for the review @yeraydiazdiaz!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
concurrency Issues related to concurrency and usage of async libraries http/2 Issues and PRs related to HTTP/2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python 3.7: RuntimeError: read() called while another coroutine is already waiting for incoming data
2 participants