Description
UnityContainer.Resolution.cs
private static ResolveDelegate OptimizingFactory(ref BuilderContext context)
Some way to either opt out of running the optimization (lambda.compile...) in a separate thread, or some way to pre-build the optimization so it wont happen during Resolve
Problem
I have found some cases where Starting a new Task inside an already runing Task.Factory.StartNew will create a StackOverflow Exception. I have a Testcase but it involves quite a lot of code, I'm working on a "smaller" version.
It may have something to do with a Polly Bulkhead Policy but thats just a guess right now.
Solution
I do not want the Container to call Task.Factory.StartNew during a Resolve.
Impact
If it is optional to optout then no impact to existing code