VS threading
Hi guys. I want to know for avoiding deadlocks in WPF applications where some part of code should be executed by UI thread. Do you use Dispatcher.Invoke(Async) or Microsoft.VisualStudio.Threading?
Andrew Arnott
Developer Support
Asynchronous and multithreaded programming within VS using the Join...
Everyone appreciates a fast and responsive UI, and Visual Studio is no exception. Extensions that run in Visual Studio play a significant role in how responsive the IDE will be for its users. Visual Studio has been evolving over the past few cycles to not only improve performance,
4 Replies
ur question is a bit weird. what u linked and
Dispatcher.Invoke(Async)
is about managing on which thread ur code executes, that has nothing to do with deadlocks.
can u elaborate on the actual problem?The full explanation is in the following links
https://github.com/microsoft/vs-threading/blob/main/doc/threading_rules.md
GitHub
vs-threading/doc/threading_rules.md at main · microsoft/vs-threading
The Microsoft.VisualStudio.Threading is a xplat library that provides many threading and synchronization primitives used in Visual Studio and other applications. - microsoft/vs-threading
Andrew Arnott
Developer Support
Asynchronous and multithreaded programming within VS using the Join...
Everyone appreciates a fast and responsive UI, and Visual Studio is no exception. Extensions that run in Visual Studio play a significant role in how responsive the IDE will be for its users. Visual Studio has been evolving over the past few cycles to not only improve performance,
Deadlock would happen when UI thread is waiting for background thread that is blocked by waiting on task that needs UI thread access