Changes are required to match current behavior of VS ThreadHelper. Since it sets SynchronizationContext in JoinableTaskFactory.MainThreadAwaite.GetResult, we need to call it from our own awaiter.
This change may also fix some of the rare issues when VS gets hanged on connection switching.
Changes are required to match current behavior of VS
ThreadHelper
. Since it sets SynchronizationContext inJoinableTaskFactory.MainThreadAwaite.GetResult
, we need to call it from our own awaiter.This change may also fix some of the rare issues when VS gets hanged on connection switching.