You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These IAsyncServiceProvider extension methods/overloads are unnecessarily, can increase thread-pool latency and should be deleted in lieu of the generic built-in extension methods from the SDK. Care should be taken to handle any behavior differences, such as these built-in extension methods throwing by default when the service does not exist.
Background:
These extension methods perform a cast on the result of IAsyncServiceProvider.GetServiceAsync, which if occurred on a background thread, can perform a blocking COM RPC to the UI thread for STA-bound objects, such as IVsSolution, DTE, etc. This will block a thread pool thread until the UI thread responds, decreasing the number of available threads, which in turn can lead to UI responsiveness issues[1]. The built-in overloads perform a non-blocking wait to the UI thread to perform the cast, and therefore do not suffer from this problem.
These IAsyncServiceProvider extension methods/overloads are unnecessarily, can increase thread-pool latency and should be deleted in lieu of the generic built-in extension methods from the SDK. Care should be taken to handle any behavior differences, such as these built-in extension methods throwing by default when the service does not exist.
Background:
These extension methods perform a cast on the result of IAsyncServiceProvider.GetServiceAsync, which if occurred on a background thread, can perform a blocking COM RPC to the UI thread for STA-bound objects, such as IVsSolution, DTE, etc. This will block a thread pool thread until the UI thread responds, decreasing the number of available threads, which in turn can lead to UI responsiveness issues[1]. The built-in overloads perform a non-blocking wait to the UI thread to perform the cast, and therefore do not suffer from this problem.
1336518
The text was updated successfully, but these errors were encountered: