The 3 Threading Rules can now be found at Microsoft/vs-threading/doc/threading_rules.md
When calling into CPS specific API's (anything underneath the Microsoft.VisualStudio.ProjectSystem
namespace) you must
use the IProjectThreadingService.JoinableTaskFactory
instead of the Shell ThreadHelper.JoinableTaskFactory
. This is
because the CPS JTF has additional knowledge to mitigate deadlocks from project lock and UI thread contentions.
Obtaining the IProjectThreadingService.
Unlike most IVs*
interfaces from Microsoft.VisualStudio.Shell
and other VS namespaces, IVs
interfaces from CPS have
no thread affinity. These interfaces can be called from any thread by CPS. The IVs
naming is to clarify that these
interfaces are specific to CPS in VS and not CPS Core.