Conversion from Task to Async to Task
See original GitHub issueHello!
I noticed that there is a conversion from Task
to Async
to Task
here: https://github.com/JordanMarr/SqlHydra/blob/7d24b1d1b8266786bb3e03a17f3e6b214e128a59/src/SqlHydra.Query/QueryContext.fs#L127
Just for my understanding, is this double conversion really necessary? And possibly correlated, why choose to return a Task and not an Async?
Cheers!
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
c# - Convert any given function into an awaitable task
The goal of the following code is to cast any given function into an awaitable function. The idea is to use it when...
Read more >7 tips for converting C# code to async/await
Every async method returns a Task . Use Task when there is no specific result for the method, which is synonymous with void...
Read more >7 tips for converting C# code to async/await - Jamie Magee
Every async method returns a Task . Use Task when there is no specific result for the method, which is synonymous with void...
Read more >Async-Sync conversion. : r/csharp
Async -Sync conversion. Say that we have two methods: public int DoSomething() { //implemented method } public async Task<int> ...
Read more >Implicit conversion from T to Task<T> · Issue #15892
I would step back and look at it this way: If the method isn't async and isn't waiting on something else, why is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thank you for the insights, very helpful for my understanding. 🙂
For your convenience, this is the one I created for my current project. I considered adding some of this stuff to the library, but wanted to wait and see what is included in F# 6.0 first.