Daily Archives: February 4, 2009

Updated CPU usage article

I made a important changes to the CPU usage code and have updated the article to reflect it. Instead of a critical section, the code uses just the interlocked increment/decrement functions. I also updated the sample demo to use multiple threads to read the CPU usage to demonstrate the thread safety clearly.


Check out my latest book, the essential, in-depth guide to performance for all .NET developers:

Writing High-Performance.NET Code, 2nd Edition by Ben Watson. Available for pre-order: