I'm looking to gain control over how ValueTasks are invoked; specifically, I'm looking to
- Force their invocation and all potential continuations onto a specific thread, and
- Execute additional logic for each synchronous chunk of them (in case they are actually async)
For regular Task<T>, I can do all of that through TaskFactory and TaskScheduler.
Is there any equivalent for those specific classes for ValueTasks that work without having to convert them to full-on Tasks?
Or maybe any differently named classes that would expose a similar, maybe smaller subset of TaskFactory/TaskScheduler functionality for ValueTasks?
I know ValueTask functionality is intentionally constraint by design, however it feels like there "should" be something to at least control scheduling of them in some basic way. I have yet to find such a thing in the framework though.