Replies: 6 comments 2 replies
-
I did talk about this with @NinoFloris . My conclusion was that ValueTask authoring using CEs wouldn't immediately reduce any allocations over
Initially we will do this as a separate community nuget package built on the resumable code feature (similar to FSharp.Control.AsyncSeq - indeed we will likely revise that). We won't add directly to FSharp.Core though I can see a world where we move some community packages to .NET Foundation and start adding references to them by default in standard F# templates. Though that begins to mean F# has a framework of its own |
Beta Was this translation helpful? Give feedback.
-
@dsyme Thanks. You've mentioned Community package - will it be based on existing TaskBuilderBase or will it use another builder? Is there a plan to "open" TaskBuilderBase or to let it stay internal only? I'm asking because I want to expreriment with ValueTask based Result builders so any info is welcome. |
Beta Was this translation helpful? Give feedback.
-
It will stay as internal only. It's not a complicated thing and can be duplicated out as needed |
Beta Was this translation helpful? Give feedback.
-
ValueTask.ToTask is painful to use in System.IO.PipeLine when everything is returning a ValueTask in high performance IO |
Beta Was this translation helpful? Give feedback.
-
After all this time (and having implemented different stuff based on There are many cases where you'd want to just simply implement some core types without resorting to additional packages. In the list above most of task builders I've made are special cased or are a convinience. But these 2 are basic ones. |
Beta Was this translation helpful? Give feedback.
-
@En3Tho Both
No. This is presently supported out of the box using the
No. At least not the version we must support.
It seems like you have a lot of experience with resumable code then. I could always use an extra hand with |
Beta Was this translation helpful? Give feedback.
-
Now, TaskBuilderBase ctor is not exposed in corresponding fsi file, basically it's internal to F# core
Is there a way to extend TaskBuilderBase to return ValueTask/IAsyncEnumerable (eg. not allocate a Task object if it not needed) other than full copy?
Are there more intricate implications with ValueTasks which prevent them to be included in FSharp.Core? I know they can't be awaited multiple time etc but I don't really see this as the reason of their absence.
And what about taskSeq? Is it planned for F# 7 or will there be a minor version introducing those?
Beta Was this translation helpful? Give feedback.
All reactions