Closed nimashoghi closed 5 years ago
What's your objective in doing so?
If it is simply for compatibility with a library that accepts ValueTask<T>
as input, you can use the constructor: new ValueTask<_>(task { ... })
.
If it is for performance, I am sorry to say that there are so many FSharpFunc objects allocated in the course of running a desugared computation expression that it will not help in the slightest to make the final result a value type.
Is there any way currently to use ValueTask instead of Task?