[*] ThreadingConfig::bPreferEnableAdaptiveSpin

This commit is contained in:
Reece Wilson 2023-08-27 20:26:22 +01:00
parent 8fe2619673
commit 97296d1fe9
2 changed files with 3 additions and 1 deletions

View File

@ -368,6 +368,7 @@ namespace Aurora
AuUInt64 bUWPNanosecondEmulationCheckFirst : 1 { false };
AuUInt64 uUWPNanosecondEmulationMaxYields : 7 { 12 };
AuUInt64 bForceEnableAdaptiveSpin : 1 { false };
AuUInt64 bPreferEnableAdaptiveSpin : 1 { true };
AuUInt64 bPreferLinuxAdaptiveSpin : 1 { true };
AuUInt64 bPreferOldWin32AdaptiveSpin : 1 { true };
AuUInt64 bPreferNewWin32AdaptiveSpin : 1 { true };

View File

@ -110,7 +110,8 @@ namespace Aurora::Threading::Primitives
void InitAdaptiveThresholdFirstTime()
{
if (!gRuntimeConfig.threadingConfig.bForceEnableAdaptiveSpin)
if (!gRuntimeConfig.threadingConfig.bForceEnableAdaptiveSpin &&
gRuntimeConfig.threadingConfig.bPreferEnableAdaptiveSpin)
{
#if defined(AURORA_IS_LINUX_DERIVED)
if (gRuntimeConfig.threadingConfig.bPreferLinuxAdaptiveSpin)