Working with databases, all the async { ... } there is, is basically .NET database drivers waiting for database.
These are natively Task and not Async operations, and in Dotnet the naming convention is: "Async in method name, returns a Task<_> object".
Because F# didn't have task { ... } the SQLProvider took the way to go witn async { ... } but now, with F# 6 there is a native task in FSharp, and this commit changes the asyncs to tasks.
I was initially thinking of backward compatibility by not changing the existing methods types, but:
You just need to add |> Async.AwaitTask if you still want to use non-task async.
The compiler outlines the places to change. Less refactoring than finding the method names and changing manually.
There is a lot of async-code and we don't benefit of double code-base size and bigger binary.
Proposed Changes
Working with databases, all the
async { ... }
there is, is basically .NET database drivers waiting for database. These are nativelyTask
and notAsync
operations, and in Dotnet the naming convention is: "Async in method name, returns aTask<_>
object".Because F# didn't have
task { ... }
the SQLProvider took the way to go witnasync { ... }
but now, with F# 6 there is a native task in FSharp, and this commit changes the asyncs to tasks.I was initially thinking of backward compatibility by not changing the existing methods types, but:
|> Async.AwaitTask
if you still want to use non-task async.So this is a breaking change.