StaudtEngineering / LidaRx

C# / .NET Reactive Extensions (Rx) for LIDAR scanners
GNU Lesser General Public License v3.0
8 stars 1 forks source link

Fix await/async context switches #2

Closed pysco68 closed 7 years ago

pysco68 commented 7 years ago

When LidaRx is used in Winforms applications the current usage of await can cause deadlocks because the runtime tries to return to specific contexts which may be the message pump which can freeze the application.

Solution: Task<T>.ConfigureAwait(continueOnCapturedContext: false); should be used on awaitables everywhere in the libraries.