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

Does this crate need async IO after all? #3

Open
daladim opened this issue Jan 20, 2022 · 0 comments
Open

Does this crate need async IO after all? #3

daladim opened this issue Jan 20, 2022 · 0 comments

Comments

@daladim
Copy link
Owner

daladim commented Jan 20, 2022

The tokio tutorial says that "performing only a few web requests" is not a good reason to use tokio and async IO, and suggests to use the blocking version of reqwest instead.

Since kitchen_fridge only performs a few web requests, and in a very limited code region (almost only in Provider::sync()), maybe we could indeed drop all the async code.
Provider::sync() could indeed be blocking (but run in a separate thread if the users wants it not to block).

This would simplify the async traits exposed in the public API, and would ease the testing as well (that currently requires being built with a specific cargo feature)

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

No branches or pull requests

1 participant