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

Can StreamReader replace FlowControlStreamReader ??? #313

Closed
kzinglzy opened this issue Apr 6, 2015 · 2 comments
Closed

Can StreamReader replace FlowControlStreamReader ??? #313

kzinglzy opened this issue Apr 6, 2015 · 2 comments
Labels

Comments

@kzinglzy
Copy link

kzinglzy commented Apr 6, 2015

From the source code, I found that the only difference between FlowControlStreamReader and StreamReader is each method at FlowControlStreamReader is a simple wrapper from StreamReader.

For example, here is the read method at FlowControlStreamReader:

self._stream.resume_stream()
 try:
        return (yield from super().read(n))
    finally:
        self._stream.pause_stream()

I also found that the FlowControlStreamReader is use to be a request payload

My confusion is that, why we have to resume_stream first and finally pause_stream at the end, can't we just use StreamReader to replace FlowControlStreamReader as a request payload ?

Thanks a lot !

@fafhrd91
Copy link
Member

fafhrd91 commented Apr 6, 2015

it is not possible to replace FlowControlStreamReader, it is required for flow control on socket transport. without it upload or download of big payloads would use all memory.

@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

No branches or pull requests

2 participants