StructuredConcurrency
StructuredConcurrency copied to clipboard
Custom Scheduler
This provides an interesting API. Do you have plans to support custom schedulers?
We use Orleans and often want to shift long-running operations off the grain's scheduler but, "at the end", shift on the last await back to the grain's scheduler to persist results. Right now, we have to do a lot of manual work to create "scopes" like you've demonstrated, capturing TaskScheduler.Current and jumping back using Task.Factory.StartNew. Do you think there's any opportunity to provide additional options/overloads to simplify use cases for custom schedulers like in Orleans?