-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Cleanup: Consider unifying sync and async code paths #10902
Comments
@smitpatel not needed? |
I don't remember what was basic idea was before. But this is what current mechanism in place.
If there is anything else we can do and should do then we can update description accordingly. Nothing specific comes to my mind. Up to @AndriySvyryd and @roji |
We still have quite a few places in EF (outside query compilation) where we have code duplication for sync/async, I think there's value in doing this - unless there are objections. One theoretical issue is that this introduces a slight CPU perf hit on the sync path because methods are now async, i.e. have a state machine, even if they always complete synchronously. That's likely to be completely negligible though. |
Using the pattern where we use async methods all the way down, but pass a flag that controls whether the actual I/O operation is performed asynchronously. See Npgsql for example.
The text was updated successfully, but these errors were encountered: