Mark 在博客中有一篇关于
用WinDGB来调试某个进程导致CPU高占的文章。在最后Mark这样描述>>
Doing this for the other four threads yields the same result - all of them are trying to access the cache value belonging to the PartnerID value of 230!
At this point I can quite confidently say that I’m sure this is a threading issue related to the non thread-safe Dictionary usage...
他的结论是:CPU高占是由于有4个线程要访问同一个缓存变量。
但是作者并没有说背后的原因,请问下背后的机制,为什么多个线程访问同一个变量会导致CPU高占呢?我的理解是不一定的.