Skip to content

Commit

Permalink
Revert "Use Task.Yield instead"
Browse files Browse the repository at this point in the history
This reverts commit 2473872.
  • Loading branch information
leeoades committed Apr 30, 2023
1 parent 2473872 commit 860de43
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/Stateless.Tests/SynchronizationContextFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ private void CaptureSyncContext()

private async Task LoseSyncContext()
{
await Task.Yield();
await Task.Run(() => { }).ConfigureAwait(false); // Switch synchronization context and continue
Assert.NotEqual(_customSynchronizationContext, SynchronizationContext.Current);
}

/// <summary>
Expand Down

0 comments on commit 860de43

Please sign in to comment.