-
Notifications
You must be signed in to change notification settings - Fork 131
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
async-sync-async switch #359
Comments
Can you send me your implementation? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
GridBase.PreProcess uses sync Count call https://github.com/gustavnavar/Grid.Blazor/blob/master/GridCore/GridBase.cs#L52 In case of sync data source it will be normal behavior. But when we try use own data source (for example based on HttpClient data fetcher) we will get dead-lock here. I recommend use approach based on CountAsync method. Unfortunately, the method is available for EF data source only. So the best way will be introduce some interface-extension to let use code override on own source and make Count in async mode.
Sure, as a best code practice I recommend introduce cancellation token every where where is this call be.
I have my own implementation and can share it, but my approach is change underlying Expression tree to put CountAsync method call. Very non-generic.
The text was updated successfully, but these errors were encountered: