InitializeCriticalSectionAndSpinCount optimal SpinCount (user mode)
问题 I don't quite understand the documentation for InitializeCriticalSectionAndSpinCount: http://msdn.microsoft.com/en-us/library/windows/desktop/ms683476(v=vs.85).aspx It says "You can improve performance significantly by choosing a small spin count ..." However, since waiting on a spinner is faster than waiting for an object, doesn't it make sense to have the SpinCount as high as possible? What am I missing? Thanks. (I am using it inside a C DLL used by a multi-threaded application) Here is the