Remove fake async-over-sync extensions #262
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Using async-over-sync is generally considered bad practice and discouraged for libraries. It makes the user think he gets actual async behavior while the only thing he actually gets is the overhead of a useless Task.
Since we already have the proper behavior for IQueryable in the project X.PagedList.EF, users should either use sync methods or reference the named package for real async implementation.
There is absolutely no point in using the async-over-sync variants. This only
makes things slower and blocks additional threads without providing any benefit
at all.
Note that X.PagedList.EF does not yet have tests, but implementing async tests for proper IQueryable is a little bit more complicated than just wrapping IEnumerable. This should be done in a future commit.