Merge pull request #8663 from dotnet-maestro-bot/merge/release/2.2-to-master

[automated] Merge branch 'release/2.2' => 'master'
This commit is contained in:
Pranav K 2018-10-29 09:59:34 -07:00 committed by GitHub
commit 13cf754425
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -181,7 +181,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Internal
cacheEntryOptions.ExpirationTokens.Add(item.ExpirationTokens[i]);
}
taskSource = new TaskCompletionSource<CompiledViewDescriptor>();
taskSource = new TaskCompletionSource<CompiledViewDescriptor>(creationOptions: TaskCreationOptions.RunContinuationsAsynchronously);
if (item.SupportsCompilation)
{
// We'll compile in just a sec, be patient.

View File

@ -88,7 +88,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers.Cache
// There is a small race condition here between TryGetValue and TryAdd that might cause the
// content to be computed more than once. We don't care about this race as the probability of
// happening is very small and the impact is not critical.
var tcs = new TaskCompletionSource<IHtmlContent>();
var tcs = new TaskCompletionSource<IHtmlContent>(creationOptions: TaskCreationOptions.RunContinuationsAsynchronously);
_workers.TryAdd(key, tcs.Task);

View File

@ -108,7 +108,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
var options = GetMemoryCacheEntryOptions();
options.AddExpirationToken(new CancellationChangeToken(tokenSource.Token));
options.SetSize(PlaceholderSize);
var tcs = new TaskCompletionSource<IHtmlContent>();
var tcs = new TaskCompletionSource<IHtmlContent>(creationOptions: TaskCreationOptions.RunContinuationsAsynchronously);
// The returned value is ignored, we only do this so that
// the compiler doesn't complain about the returned task