314 references to Yield
AnalyzerRunner (1)
DiagnosticAnalyzerRunner.cs (1)
388await Task.Yield();
Aspire.Hosting.Tests (1)
WithEnvironmentTests.cs (1)
204await Task.Yield();
BasicTestApp (8)
InteropTest\JavaScriptInterop.cs (5)
23await Task.Yield(); 401await Task.Yield(); 423await Task.Yield(); 476await Task.Yield(); 519await Task.Yield();
Program.cs (1)
94await Task.Yield();
ServerReliability\ThrowingOnAfterRenderAsyncComponent.cs (1)
20await Task.Yield();
ServerReliability\ThrowingSetParametersAsyncComponent.cs (1)
16await Task.Yield();
BasicWebSite (2)
Controllers\AsyncActionsController.cs (1)
27await Task.Yield();
Controllers\AsyncDisposableController.cs (1)
37await Task.Yield();
Binding.Http.IntegrationTests (2)
OperationContextTests.cs (2)
49await Task.Yield(); 59await Task.Yield(); // Hop back to original sync context
Binding.Tcp.IntegrationTests (7)
OperationContextAsyncFlowTests.cs (7)
36await Task.Yield(); 46await Task.Yield(); // Hop back to original sync context 71await Task.Yield(); 79await Task.Yield(); 93await Task.Yield(); // Hop back to original sync context 162await Task.Yield(); 175await Task.Yield(); // Hop back to original sync context
Client.TypedClient.IntegrationTests (1)
TypedProxyTests.4.0.0.cs (1)
610await Task.Yield();
FormatterWebSite (2)
Controllers\AsyncEnumerableController.cs (1)
19await Task.Yield();
Controllers\SystemTextJsonOutputFormatterController.cs (1)
25await Task.Yield();
HttpStress (1)
Program.cs (1)
466await Task.Yield();
InMemory.FunctionalTests (4)
ConnectionMiddlewareTests.cs (1)
374await Task.Yield();
HttpsConnectionMiddlewareTests.cs (2)
174await Task.Yield(); 339await Task.Yield();
HttpsTests.cs (1)
406await Task.Yield();
Interop.FunctionalTests (1)
HttpClientHttp2InteropTests.cs (1)
218await Task.Yield(); // Intermix writes
Microsoft.AspNetCore.Components.Authorization.Tests (1)
TestAsyncAuthorizationService.cs (1)
22await Task.Yield();
Microsoft.AspNetCore.Components.Endpoints.Tests (5)
EndpointHtmlRendererTest.cs (1)
1839await Task.Yield();
RazorComponentResultTest.cs (4)
111await Task.Yield(); 197await Task.Yield(); 345await Task.Yield(); // Just to show it's still not completed after 378await Task.Yield(); // Just to show it's still not completed after
Microsoft.AspNetCore.Components.Tests (16)
ComponentBaseTest.cs (1)
362await Task.Yield();
NavigationManagerTest.cs (9)
318await Task.Yield(); 490await Task.Yield(); 552await Task.Yield(); 737await Task.Yield(); 763await Task.Yield(); 768await Task.Yield(); 789await Task.Yield(); 811await Task.Yield(); 816await Task.Yield();
RendererTest.cs (3)
3927await Task.Yield(); 3939await Task.Yield(); 5819await Task.Yield();
Rendering\RendererSynchronizationContextTest.cs (3)
280await Task.Yield(); 388await Task.Yield(); 773await Task.Yield();
Microsoft.AspNetCore.Components.Web.Tests (3)
HtmlRendering\HtmlRendererTest.cs (3)
1225await Task.Yield(); 1325await Task.Yield(); 1345await Task.Yield();
Microsoft.AspNetCore.ConcurrencyLimiter.Microbenchmarks (3)
QueueEmptyOverhead.cs (1)
68await Task.Yield();
QueueFullOverhead.cs (1)
52await Task.Yield();
QueueRequestsOverwritten.cs (1)
52await Task.Yield();
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (5)
Logging\TestController.cs (5)
21await Task.Yield(); 30await Task.Yield(); 39await Task.Yield(); 47await Task.Yield(); 56await Task.Yield();
Microsoft.AspNetCore.Http.Connections (1)
Internal\HttpConnectionContext.cs (1)
633await Task.Yield();
Microsoft.AspNetCore.Http.Extensions.Tests (20)
HttpResponseJsonExtensionsTests.cs (7)
278await Task.Yield(); 303await Task.Yield(); 333await Task.Yield(); 367await Task.Yield(); 401await Task.Yield(); 435await Task.Yield(); 502await Task.Yield();
RequestDelegateFactoryTests.cs (13)
478await Task.Yield(); 496await Task.Yield(); 1312await Task.Yield(); 1319await Task.Yield(); 2246await Task.Yield(); 2257await Task.Yield(); 2332await Task.Yield(); 2337await Task.Yield(); 2346await Task.Yield(); 2402await Task.Yield(); 2442await Task.Yield(); 2453await Task.Yield(); 2468await Task.Yield();
Microsoft.AspNetCore.Http.Microbenchmarks (2)
RequestTimeoutsMiddlewareBenchmark.cs (2)
21async context => { await Task.Yield(); }, 27async context => { await Task.Yield(); },
Microsoft.AspNetCore.Http.Results.Tests (1)
HttpResultsHelperTests.cs (1)
226await Task.Yield();
Microsoft.AspNetCore.InternalTesting.Tests (6)
CollectingEventListenerTest.cs (6)
23await Task.Yield(); 25await Task.Yield(); 27await Task.Yield(); 44await Task.Yield(); 46await Task.Yield(); 48await Task.Yield();
Microsoft.AspNetCore.Mvc.Core.Test (15)
Formatters\SystemTextJsonOutputFormatterTest.cs (3)
149await Task.Yield(); 253await Task.Yield(); 337await Task.Yield();
Infrastructure\ActionMethodExecutorTest.cs (1)
487return Task.Yield();
Infrastructure\AsyncEnumerableReaderTest.cs (5)
222await Task.Yield(); 229await Task.Yield(); 238await Task.Yield(); 245await Task.Yield(); 265await Task.Yield();
Infrastructure\JsonResultExecutorTestBase.cs (6)
384await Task.Yield(); 418await Task.Yield(); 442await Task.Yield(); 467await Task.Yield(); 521await Task.Yield(); 528await Task.Yield();
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (4)
XmlDataContractSerializerOutputFormatterTest.cs (2)
746await Task.Yield(); 782await Task.Yield();
XmlSerializerOutputFormatterTest.cs (2)
528await Task.Yield(); 564await Task.Yield();
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (15)
NewtonsoftJsonOutputFormatterTest.cs (3)
467await Task.Yield(); 507await Task.Yield(); 545await Task.Yield();
NewtonsoftJsonResultExecutorTest.cs (1)
56await Task.Yield();
src\Mvc\Mvc.Core\test\Infrastructure\AsyncEnumerableReaderTest.cs (5)
222await Task.Yield(); 229await Task.Yield(); 238await Task.Yield(); 245await Task.Yield(); 265await Task.Yield();
src\Mvc\Mvc.Core\test\Infrastructure\JsonResultExecutorTestBase.cs (6)
384await Task.Yield(); 418await Task.Yield(); 442await Task.Yield(); 467await Task.Yield(); 521await Task.Yield(); 528await Task.Yield();
Microsoft.AspNetCore.OutputCaching.Tests (3)
MemoryOutputCacheStoreTests.cs (3)
82await Task.Yield(); 188await Task.Yield(); 193await Task.Yield();
Microsoft.AspNetCore.Routing.FunctionalTests (1)
EndpointRoutingIntegrationTest.cs (1)
18private static readonly RequestDelegate TestDelegate = async context => await Task.Yield();
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (1)
HubConnectionTests.cs (1)
2337await Task.Yield();
Microsoft.AspNetCore.SignalR.Client.Tests (25)
LongPollingTransportTests.cs (15)
38await Task.Yield(); 73await Task.Yield(); 107await Task.Yield(); 162await Task.Yield(); 190await Task.Yield(); 236await Task.Yield(); 281await Task.Yield(); 330await Task.Yield(); 372await Task.Yield(); 411await Task.Yield(); 466await Task.Yield(); 534await Task.Yield(); 590await Task.Yield(); 619await Task.Yield(); 645await Task.Yield();
ServerSentEventsTransportTests.cs (9)
34await Task.Yield(); 128await Task.Yield(); 178await Task.Yield(); 233await Task.Yield(); 276await Task.Yield(); 307await Task.Yield(); 365await Task.Yield(); 392await Task.Yield(); 477await Task.Yield();
TestHttpMessageHandler.cs (1)
80await Task.Yield();
Microsoft.AspNetCore.SignalR.Microbenchmarks (1)
DefaultHubDispatcherBenchmark.cs (1)
176await Task.Yield();
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (1)
TestConnectionMultiplexer.cs (1)
353await Task.Yield();
Microsoft.AspNetCore.SignalR.Tests (25)
HubConnectionHandlerTestUtils\Hubs.cs (12)
720await Task.Yield(); 727await Task.Yield(); 733await Task.Yield(); 741await Task.Yield(); 748await Task.Yield(); 757await Task.Yield(); 834await Task.Yield(); 840await Task.Yield(); 846await Task.Yield(); 852await Task.Yield(); 1120await Task.Yield(); 1137await Task.Yield();
NativeAotTests.cs (13)
126await Task.Yield(); 128await Task.Yield(); 134await Task.Yield(); 136await Task.Yield(); 138await Task.Yield(); 196await Task.Yield(); // ensure the returned Task gets awaited correctly 202await Task.Yield(); // ensure the returned Task gets awaited correctly 216await Task.Yield(); // ensure the returned Task gets awaited correctly 222await Task.Yield(); // ensure the returned Task gets awaited correctly 237await Task.Yield(); 274await Task.Yield(); 276await Task.Yield(); 288await Task.Yield();
Microsoft.CodeAnalysis.CodeStyle (6)
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
215await Task.Yield().ConfigureAwait(false);
src\Dependencies\Threading\ConfiguredYieldAwaitable.cs (1)
14/// <see cref="Task.Yield"/>.
src\Dependencies\Threading\YieldAwaitableExtensions.cs (2)
13/// Implements <c>ConfigureAwait(bool)</c> for <see cref="Task.Yield"/>. The resulting behavior in asynchronous code 16/// <param name="awaitable">The awaitable provided by <see cref="Task.Yield"/>.</param>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (2)
368await Task.Yield().ConfigureAwait(false); 377await Task.Yield().ConfigureAwait(false);
Microsoft.CodeAnalysis.EditorFeatures (1)
Remote\SolutionChecksumUpdater.cs (1)
215await Task.Yield().ConfigureAwait(false);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
CodeRefactorings\ErrorCases\CodeRefactoringExceptionInComputeRefactoringsAsync.cs (1)
28await Task.Yield();
Microsoft.CodeAnalysis.Features (4)
CodeFixes\Service\CodeFixService.cs (1)
159await Task.Yield().ConfigureAwait(false);
Diagnostics\Service\DiagnosticAnalyzerService.cs (1)
110await Task.Yield().ConfigureAwait(false);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingIdleProcessor.cs (2)
114await Task.Yield().ConfigureAwait(false); 123await Task.Yield().ConfigureAwait(false);
Microsoft.CodeAnalysis.InteractiveHost (4)
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
215await Task.Yield().ConfigureAwait(false);
src\Dependencies\Threading\ConfiguredYieldAwaitable.cs (1)
14/// <see cref="Task.Yield"/>.
src\Dependencies\Threading\YieldAwaitableExtensions.cs (2)
13/// Implements <c>ConfigureAwait(bool)</c> for <see cref="Task.Yield"/>. The resulting behavior in asynchronous code 16/// <param name="awaitable">The awaitable provided by <see cref="Task.Yield"/>.</param>
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\AbstractLanguageServer.cs (2)
258await Task.Yield(); 294await Task.Yield();
Microsoft.CodeAnalysis.Remote.ServiceHub (2)
Host\AssetProvider.cs (2)
192await Task.Yield(); 234await Task.Yield();
Microsoft.CodeAnalysis.Remote.Workspaces (4)
AbstractAssetProvider.cs (2)
78await Task.Yield(); 137await Task.Yield();
ExportProviderBuilder.cs (1)
149await Task.Yield().ConfigureAwait(false);
RemoteCallback.cs (1)
136await Task.Yield();
Microsoft.CodeAnalysis.Threading.Package (4)
AsyncBatchingWorkQueue`2.cs (1)
215await Task.Yield().ConfigureAwait(false);
ConfiguredYieldAwaitable.cs (1)
14/// <see cref="Task.Yield"/>.
YieldAwaitableExtensions.cs (2)
13/// Implements <c>ConfigureAwait(bool)</c> for <see cref="Task.Yield"/>. The resulting behavior in asynchronous code 16/// <param name="awaitable">The awaitable provided by <see cref="Task.Yield"/>.</param>
Microsoft.CodeAnalysis.Workspaces (10)
Log\RoslynEventSource.cs (1)
77Task.Yield().GetAwaiter().OnCompleted(FireAndForgetSendFunctionDefinitions);
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
215await Task.Yield().ConfigureAwait(false);
src\Dependencies\Threading\ConfiguredYieldAwaitable.cs (1)
14/// <see cref="Task.Yield"/>.
src\Dependencies\Threading\YieldAwaitableExtensions.cs (2)
13/// Implements <c>ConfigureAwait(bool)</c> for <see cref="Task.Yield"/>. The resulting behavior in asynchronous code 16/// <param name="awaitable">The awaitable provided by <see cref="Task.Yield"/>.</param>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (2)
368await Task.Yield().ConfigureAwait(false); 377await Task.Yield().ConfigureAwait(false);
TemporaryStorage\TemporaryStorageService.cs (2)
133await Task.Yield().ConfigureAwait(false); 272await Task.Yield().ConfigureAwait(false);
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (1)
466await Task.Yield().ConfigureAwait(false);
Microsoft.CodeAnalysis.Workspaces.UnitTests (10)
UtilityTest\AsyncLazyTests.cs (1)
281await Task.Yield();
UtilityTest\SpecializedTasksTests.cs (8)
129await Task.Yield(); 156await Task.Yield(); 212await Task.Yield(); 272await Task.Yield(); 339await Task.Yield(); 415await Task.Yield(); 498await Task.Yield(); 541await Task.Yield();
WorkspaceServiceTests\TemporaryStorageServiceTests.cs (1)
126await Task.Yield();
Microsoft.CommonLanguageServerProtocol.Framework.Package (2)
AbstractLanguageServer.cs (2)
258await Task.Yield(); 294await Task.Yield();
Microsoft.DotNet.Helix.JobSender (1)
Payloads\DirectoryPayload.cs (1)
43await Task.Yield();
Microsoft.DotNet.Helix.Sdk (2)
CreateXUnitWorkItems.cs (1)
91await Task.Yield();
WaitForHelixJobCompletion.cs (1)
38await Task.Yield();
Microsoft.DotNet.XUnitAssert.Tests (16)
AsyncCollectionAssertsTests.cs (8)
73 await Assert.ThrowsAsync<ArgumentNullException>("collection", () => Assert.AllAsync(default(IAsyncEnumerable<object>)!, async _ => await Task.Yield())); 83 await Assert.AllAsync(items, async item => { await Task.Yield(); Assert.Equal(1, item); }); 114 await Assert.AllAsync(items, async (_, idx) => { await Task.Yield(); indices.Add(idx); }); 210 async item => await Task.Yield() 233 await Task.Yield(); 238 await Task.Yield(); 253 await Task.Yield(); 258 await Task.Yield();
CollectionAssertsTests.cs (8)
71 await Assert.ThrowsAsync<ArgumentNullException>("collection", () => Assert.AllAsync(default(IEnumerable<object>)!, async _ => await Task.Yield())); 81 await Assert.AllAsync(items, async item => { await Task.Yield(); Assert.Equal(1, item); }); 112 await Assert.AllAsync(items, async (_, idx) => { await Task.Yield(); indices.Add(idx); }); 210 async item => await Task.Yield() 233 await Task.Yield(); 238 await Task.Yield(); 253 await Task.Yield(); 258 await Task.Yield();
Microsoft.Extensions.AI.Abstractions.Tests (6)
ChatCompletion\ChatClientExtensionsTests.cs (1)
163await Task.Yield();
ChatCompletion\ChatResponseUpdateExtensionsTests.cs (1)
210await Task.Yield();
ChatCompletion\DelegatingChatClientTests.cs (1)
156await Task.Yield();
SpeechToText\DelegatingSpeechToTextClientTests.cs (1)
157await Task.Yield();
SpeechToText\SpeechToTextClientExtensionsTests.cs (1)
87await Task.Yield();
SpeechToText\SpeechToTextResponseUpdateExtensionsTests.cs (1)
136await Task.Yield();
Microsoft.Extensions.AI.Tests (36)
ChatCompletion\ConfigureOptionsChatClientTests.cs (1)
93await Task.Yield();
ChatCompletion\DistributedCachingChatClientTest.cs (3)
528await Task.Yield(); 579await Task.Yield(); 711await Task.Yield();
ChatCompletion\FunctionInvokingChatClientTests.cs (4)
647await Task.Yield(); 677await Task.Yield(); 952await Task.Yield(); 1104await Task.Yield();
ChatCompletion\LoggingChatClientTests.cs (1)
107await Task.Yield();
ChatCompletion\OpenTelemetryChatClientTests.cs (4)
40await Task.Yield(); 67await Task.Yield(); 71await Task.Yield(); 141await Task.Yield();
ChatCompletion\UseDelegateChatClientTests.cs (1)
243await Task.Yield();
Embeddings\DistributedCachingEmbeddingGeneratorTest.cs (2)
234await Task.Yield(); 285await Task.Yield();
Embeddings\OpenTelemetryEmbeddingGeneratorTests.cs (1)
38await Task.Yield();
Functions\AIFunctionFactoryTest.cs (17)
108func = AIFunctionFactory.Create(async Task (int a, long b) => { result = a + b; await Task.Yield(); }); 113func = AIFunctionFactory.Create(async ValueTask (int a, long b) => { result = a + b; await Task.Yield(); }); 124await Task.Yield(); 639await Task.Yield(); 657async (int i) => { await Task.Yield(); }, 662await Task.Yield(); 680async ValueTask (int i) => { await Task.Yield(); }, 685await Task.Yield(); 708await Task.Yield(); 726async (int i) => { await Task.Yield(); return i; }, 731await Task.Yield(); 749async ValueTask<int> (int i) => { await Task.Yield(); return i; }, 754await Task.Yield(); 772async ValueTask<string?> (int i) => { await Task.Yield(); return null; }, 777await Task.Yield(); 795async ValueTask<B> (int i) => { await Task.Yield(); return new C(); }, 800await Task.Yield();
SpeechToText\ConfigureOptionsSpeechToTextClientTests.cs (1)
96await Task.Yield();
SpeechToText\LoggingSpeechToTextClientTests.cs (1)
110await Task.Yield();
Microsoft.Extensions.Caching.Hybrid.Tests (1)
UnreliableL2Tests.cs (1)
188await Task.Yield();
Microsoft.Extensions.Diagnostics.HealthChecks (1)
HealthCheckPublisherHostedService.cs (1)
181await Task.Yield();
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (1)
HealthCheckPublisherHostedServiceTest.cs (1)
362await Task.Yield();
Microsoft.Extensions.Diagnostics.Probes (1)
TcpEndpointProbesService.cs (1)
70await Task.Yield();
Microsoft.JSInterop.Tests (1)
Infrastructure\DotNetDispatcherTest.cs (1)
1050await Task.Yield();
Microsoft.VisualStudio.LanguageServices (1)
Workspace\SourceGeneratedFileManager.cs (1)
454await Task.Yield();
Mvc.Api.Analyzers.Test (7)
TestFiles\ActualApiResponseMetadataFactoryTest\TryGetActualResponseMetadataTests.cs (3)
13await Task.Yield(); 21await Task.Yield(); 29await Task.Yield();
TestFiles\ApiConventionAnalyzerIntegrationTest\DiagnosticsAreReturned_IfAsyncMethodReturningValueTaskWithProducesResponseTypeAttribute_ReturnsUndocumentedStatusCode.cs (1)
15await Task.Yield();
TestFiles\ApiConventionAnalyzerIntegrationTest\DiagnosticsAreReturned_IfAsyncMethodWithProducesResponseTypeAttribute_ReturnsUndocumentedStatusCode.cs (1)
15await Task.Yield();
TestFiles\ApiConventionAnalyzerIntegrationTest\DiagnosticsAreReturned_IfMethodWithAttributeAsynchronouslyReturnsValue_WithoutDocumentation.cs (1)
14await Task.Yield();
TestFiles\ApiConventionAnalyzerIntegrationTest\NoDiagnosticsAreReturned_ForOkResultReturningAction.cs (1)
14await Task.Yield();
Roslyn.VisualStudio.DiagnosticsWindow (2)
OptionPages\ForceLowMemoryMode.cs (2)
104await Task.Yield(); 132await Task.Yield();
Sockets.FunctionalTests (1)
src\Servers\Kestrel\test\FunctionalTests\ResponseTests.cs (1)
537await Task.Yield();
System.Windows.Forms.UI.IntegrationTests (2)
Infra\ControlTestBase.cs (1)
154await Task.Yield();
TabControlTests.cs (1)
107await Task.Yield();
VBCSCompiler.UnitTests (1)
ServerUtil.cs (1)
120await Task.Yield();