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

AsyncReader #265

Merged
merged 13 commits into from
Feb 26, 2024
Merged

AsyncReader #265

merged 13 commits into from
Feb 26, 2024

Conversation

Ech0riginal
Copy link
Contributor

This PR's goal is to introduce an AsyncReader via Tokio. There's a lot of code duplication due to my not being familiar with the pattern used here, but it's all feature-gated by "async". The examples are 99% copies, we could throw them in an async folder to separate? Don't mind to make changes re: code duplication, suggestions welcome.

@Ech0riginal
Copy link
Contributor Author

After spending more than a few minutes with the code I removed the AsyncReader then shoved the async reading into a feature-gated Document implementation. Much cleaner that way and without a ton of code duplication.

There's also an addition of tests/utils to make testing either sync or async smooth, both functions in there are tagged as dead_code to avoid compiler warnings, they are not. Lots of duplication in the examples still.

@J-F-Liu J-F-Liu merged commit 5431715 into J-F-Liu:master Feb 26, 2024
6 of 8 checks passed
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.

2 participants