Concurrent Programming

A quick review of the Concurrency Visualizer in Visual Studio 2015

The Concurrency visualizer is a free extension available in Visual Studio 2015 that can be used to analyse the performance of a concurrent application. I am going to do a simple overview of this extension.

The tested code

This is the code I am going to profile with the extension. It basically creates four non blocking tasks that compute 1 x 1 infinitely. The main thread then waits for user input.

Concurrency Visualizer in action

CPU Utilization shows that nearly 100% of four cores are used.


The profile reports shows that four CLR worker threads (9664, 6352, 5168, and 9724) in execution most of the time, and the main thread waits for I/O most of the time.


Clicking on a particular worker thread at a particular time shows the call stack.


The core view show that threads switches cores while running. More specifically, our four worker threads have more than one third of their context switches that cross cores.


Concurrency visualizer helps identify problems like : serialized execution (thread executing one at a time), poor work distribution, over subscription (too many active threads), overuse of I/O, inefficient synchronization (lock convoys). It seems like a great tool!