Merge branch 'benaadams/Task.Run-QueueUserWorkItem' into dev

This commit is contained in:
Stephen Halter 2015-11-12 15:51:42 -08:00
commit fdfd7dcf36
1 changed files with 2 additions and 2 deletions

View File

@ -128,7 +128,7 @@ namespace Microsoft.AspNet.Server.Kestrel.Http
if (awaitableState != _awaitableIsCompleted &&
awaitableState != _awaitableIsNotCompleted)
{
Task.Run(awaitableState);
ThreadPool.QueueUserWorkItem((o) => ((Action)o)(), awaitableState);
}
}
@ -194,7 +194,7 @@ namespace Microsoft.AspNet.Server.Kestrel.Http
}
else if (awaitableState == _awaitableIsCompleted)
{
Task.Run(continuation);
ThreadPool.QueueUserWorkItem((o) => ((Action)o)(), continuation);
}
else
{