DEV Community

Discussion on: Data Access in F#

Collapse
 
seangwright profile image
Sean G. Wright

Does the following change with the new F# 6 Task features?

|> Async.AwaitTask
|> Async.RunSynchronously
Enter fullscreen mode Exit fullscreen mode
Collapse
 
tunaxor profile image
Angel Daniel Munoz Gonzalez

For F# scripts it doesn't, if you omit them the script will exit before the execution finishes I could have used Task.Wait() as well but I went with what I have been using in previous posts.

In contexts where you are running inside a function that returns a task or async these are not necessary
i. e. An aspnet handler or an async func

Collapse
 
seangwright profile image
Sean G. Wright

Interesting. I haven't used scripts much in the past because the NuGet support wasn't great, but I like that they are easier to use now.

Thread Thread
 
tunaxor profile image
Angel Daniel Munoz Gonzalez

Yeah, they are in a much better state now, start times are a bit slow but they can be great in some contexts like sharing, teaching, showcasing, or prototyping, even automation I believe