3 ms·
Do Windows, MacOS/iOS, and console OS's treat spinlocks more friendly than Linux?
by shadowgovt 7y ago
Do Windows, MacOS/iOS, and console OS's treat spinlocks more friendly than Linux?
- CoolGuySteve 7y agoIn Windows, CriticalSection can spin for a user-defined period of time, which is more or less what you want. Although it would probably make more sense for it to have a "spin until my quantum is over" option because how is the caller supposed to know that? https://docs.microsoft.com/en-us/cpp/cppcx/wrl/criticalsection-class?view=vs-2019#criticalsection https://docs.microsoft.com/en-us/cpp/cppcx/wrl/criticalsecti...