-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Make Dapper use the new IValueTask<T> instead of Task? #1413
Comments
I wouldn't trust that blog author - that guy's a jerk! |
OK, more seriously; it is a major breaking change; yes, it is something that will be considered - at the same time as implementing |
Copy that @mgravell , thank you for making Dapper and resolving my last concern ever so smoothly and friendly! Is it still good from my side though to refactor all my Task methods (ASP.NET Core 3.1) to be ValueTask/ValueTask of T? If you could give me your stance on this, I'd really appreciate it! EDIT: If I might add, why do you recommend to avoid using PooledAwait in the blog? Is it simply to the risk of awaiting something twice, or perhaps inclining to await the official implementation of Microsoft for this neat feature? |
Well, refactoring anything should always be done with care - and changing the return type of a method or property is inherently a breaking change, so : don't go mad with it; however, I'd generally be OK with switching to As for |
Thank you so much for the insights! Feel free to close this issue, unless you prefer leaving it as a straw for the future. |
I'm not entirely sure if it's being done already. A quick search for ValueTask reveals only this much.
As to why - this read explains it very well, with very important references to github discussions (dotnet/coreclr#26310) for the planned changes coming into .NET 5.
The text was updated successfully, but these errors were encountered: