Skip to content

Commit

Permalink
Merge pull request #528 from leeoades/bugfix/guarantee-synchronizatio…
Browse files Browse the repository at this point in the history
…ncontext-change

Change mechanism for losing the synchronization context
  • Loading branch information
mclift authored May 10, 2023
2 parents 19793af + 860de43 commit e69c66c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/Stateless.Tests/SynchronizationContextFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ private void CaptureSyncContext()

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

Expand Down

0 comments on commit e69c66c

Please sign in to comment.