Skip to content

Commit e1585c2

Browse files
committed
Merge branch 'release/5.11' of https://github.com/unitycontainer/container into release/5.11
2 parents e8f7d70 + 0b0a0ae commit e1585c2

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/UnityContainer.Resolution.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,11 @@ private static ResolveDelegate<BuilderContext> OptimizingFactory(ref BuilderCont
287287
// Check if optimization is required
288288
if (0 == Interlocked.Decrement(ref counter))
289289
{
290+
#if NET40
290291
Task.Factory.StartNew(() => {
291-
292+
#else
293+
Task.Run(() => {
294+
#endif
292295
// Compile build plan on worker thread
293296
var expressions = new List<Expression>();
294297
foreach (var processor in chain)

0 commit comments

Comments
 (0)