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

Maybe resume read nowait #1206

Merged
merged 7 commits into from
Oct 4, 2016
Merged

Conversation

dalazx
Copy link
Contributor

@dalazx dalazx commented Sep 22, 2016

What do these changes do?

FlowControlStreamReader.read_nowait was not resuming the underlaying transport in case the buffers are drained, so that the subsequent FlowControlStreamReader.read call would hang until it timed out.

read, readany and others had @maybe_resume decorator but read_nowait did not. Since read_nowait changes _buffer and _buffer_size, we need to check the new size against _buffer_limit and perform the pause/resume action accordingly.

Are there changes in behavior for the user?

Related issue number

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • Add yourself to CONTRIBUTORS.txt
  • Add a new entry to CHANGES.rst
    • Choose any open position to avoid merge conflicts with other PRs.
    • Add a link to the issue you are fixing (if any) using #isuue_number format at the end of changelog message. Use Pull Request number if there are no issues for PR or PR covers the issue only partially.

@codecov-io
Copy link

codecov-io commented Sep 22, 2016

Current coverage is 98.53% (diff: 100%)

Merging #1206 into 1.0 will increase coverage by 0.18%

@@                1.0      #1206   diff @@
==========================================
  Files            29         29          
  Lines          6530       6545    +15   
  Methods           0          0          
  Messages          0          0          
  Branches       1094       1095     +1   
==========================================
+ Hits           6422       6449    +27   
+ Misses           56         45    -11   
+ Partials         52         51     -1   

Powered by Codecov. Last update a6e39f2...ca5ed93

@asvetlov
Copy link
Member

@dalazx please add a test or two for covering all affected lines.
I love to merge your PR and publish a new bugfix release but want to improve test coverage especially in complex cases like stream resuming.
My final target is 100% coverage someday.

@dalazx
Copy link
Contributor Author

dalazx commented Oct 3, 2016

@asvetlov please take a look

@asvetlov asvetlov merged commit 493c048 into aio-libs:1.0 Oct 4, 2016
@asvetlov
Copy link
Member

asvetlov commented Oct 4, 2016

Awesome!
Thanks, @dalazx !

@dalazx dalazx deleted the maybe_resume_read_nowait branch October 7, 2016 19:46
@lock
Copy link

lock bot commented Oct 29, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants