microsoft / RTVS

R Tools for Visual Studio.
MIT License
390 stars 110 forks source link

Update MainThreadAwaiter #4186

Closed AlexanderSher closed 7 years ago

AlexanderSher commented 7 years ago

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.

MikhailArkhipov commented 7 years ago

👍