Skip to content

Commit 1fe0fb0

Browse files
authored
Fixed #197
1 parent aa8d9ac commit 1fe0fb0

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)