StructuredConcurrency icon indicating copy to clipboard operation
StructuredConcurrency copied to clipboard

Custom Scheduler

Open seniorquico opened this issue 2 years ago • 0 comments

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?

seniorquico avatar Apr 16 '23 02:04 seniorquico