MTConnect.NET icon indicating copy to clipboard operation
MTConnect.NET copied to clipboard

TaskCompletionSource may hang an application when used with async/await.

Open SergeyGulik opened this issue 1 year ago • 0 comments

Please start with this article https://devblogs.microsoft.com/premier-developer/the-danger-of-taskcompletionsourcet-class/ It had bitten us several times in the past, so I analyzed the code and for all TCS-s that are used with async/await, added the TaskCreationOptions.RunContinuationsAsynchronously option. No, I have not got into the problem yet with MTConnect.NET. But from the experience it will happen sooner or later.

SergeyGulik avatar Oct 16 '24 20:10 SergeyGulik