allure-csharp icon indicating copy to clipboard operation
allure-csharp copied to clipboard

Remove ConfigureAwait(false) in WrapAsync to avoid SynchronizationContext switch

Open vanbukin opened this issue 2 years ago • 1 comments

Remove ConfigureAwait(false) to avoid switching into default SynchronizationContext.

Context

We have SpecFlow + NUnit + Allure libs in the same project. SpecFlow uses it's own SynchronizationContext. Async code that executes inside methods that marked as [AllureStep] will always switch into default SynchronizationContext.

Checklist

vanbukin avatar Feb 18 '23 06:02 vanbukin

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Feb 18 '23 06:02 CLAassistant