Replies: 2 comments 3 replies
-
Task builder should probably solve it, or a simple alias to |
Beta Was this translation helpful? Give feedback.
0 replies
-
You can do |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
[EDIT: All irrelevant, please see comment from
theprash
below]I find myself using
task
more thanasync
because of interop with existing dotnet libraries. I sometimes feel that code like this is more verbose than it needs to be.I appreciate it would be very easy for me to simply create a function or operator that makes this slightly more succinct. E.g.
I also appreciate that if I have code like this in lots of different places in my app, I'm almost definitely doing something wrong.
However, does anyone think there's any value in trying to come up with a more succinct standard approach for this? It seems quite verbose for something that comes up often.
There's probably a good reason for this not being cleaner. Obviously we need to keep Async.AwaitTask |> Async.RunSynchronously, so any addition would mean multiple ways to achieve the same thing which is bad. Unfortunately I have no clever ideas on ways around this.
Beta Was this translation helpful? Give feedback.
All reactions