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

Bug fix: Implementing futures_io::AsyncBufRead is not straightforward. #12

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

cheako
Copy link

@cheako cheako commented Dec 12, 2021

This contains the other two PRs.

I can't find the function that did this, but it was something like if Ready is returned and then Pending immediately leads to panic. As such, if there is any data in a BufReader poll_fill_buf can not, by circular logic, read more async data... Because it can not call read and then return Pending, so it would be a blocking read call.

As such, there is no way to implement a nom wrapper AND a BufReader, because nom may need more data even if there is some data and this violates the conditions of implementing a BufReader.

@cheako
Copy link
Author

cheako commented Dec 12, 2021

Looking at it, it could probably be done better... I'm just tied down with other things.

@cheako
Copy link
Author

cheako commented Dec 19, 2021

Fixes: #10

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

Successfully merging this pull request may close these issues.

3 participants