/// Update 2023: spoilers it had nothing to do with the 2022 russian trolling directly, but who didn't see it coming?
/// i dont care about politics; its just useful to divide the glow by factions.
boolallowRussianCerts{true};
};
structAsyncConfig
{
boolbStartSchedularOnStartup{true};// turn this off to make your application lighter-weight; turn this on for higher performance (+expensive) scheduling
boolbEnableLegacyTicks{false};// turn this on to enable an async apps singleton threadpool to SysPump on worker id zero. Alternatively, use SetMainThreadForSysPumpScheduling once you have a thread pool and worker id.
AuUInt32threadPoolDefaultStackSize{};
AuUInt32dwSchedulerRateLimitMS{2};//
AuUInt32dwLegacyMainThreadSystemTickMS{25};// nowadays this is primarily used to dispatch main-thread posted (AuConsole) commands
boolbIsApplicationClientSoftwareOnJitteryMemorySystem{false};// enable me to enable padding from system out of memory conditions.
// the catch: usually this memory is reserved for exit callbacks, internal low memory conditions, error reporting, and the like.
//
// generally you should not exploit this without ** acknowledging this thread-local condition via AuDebug::[Add/Dec]MemoryCrunch. ** ( << tl;dr: recommended way of accessing this memory)
//
// setting this flag enables debug buffer memory to be used at any point during any threads execution - the moment mimalloc runs
// out of pre-reserved and system mappable memory. i wouldn't use this for anything except monolithic client/user-facing applications
// that are likely to run on low resource systems (low spec or heavy app), with untested/uncaught C++ allocations splattered everywhere.
// this could be VERY useful to end users who are running into `bIsMemoryErrorFatal` crashes.
AuUInt32uDebugMemoryReserveSize{3*1024*1024};/* nowdays: a single v8 isolate is low sub-tens MB of memory, executable file sizes are low mbs, image sizes are much larger. forget small low-footprint vms
boolbWin32VerifyTrustFailMissingAPI{true};// just to not be annoying in the future
};
structThreadingConfig
{
// WARN: these values are not final
boolbNoThreadNames{false};
boolbPlatformIsSMPProcessorOptimized{true};// Whether to attempt to using mm_pause or similar instruction before yielding into the kernel
AuUInt16uSpinLoopPowerA{128};// Nudgable spinloop power. This is our local userland niceness factor
// This is comparable to Win32's SetCriticalSectionSpinCount applied across every single AuThreadPrimitives try-lock and lock.
// Adjust this value to compensate for longer critical sections when context switching isn't preferrable.
AuUInt64bEnableAggressiveScheduling:1{false};
AuUInt64bEnableAgrSchedulingRatelimit:1{true};
AuUInt64bPreferNt51XpMutexesOver8:1{false};
AuUInt64bPreferNt51XpCondvarsOver8:1{false};
AuUInt64bPreferNtCondvarModernWinSpin:1{false};
AuUInt64bPreferNtCondvarOlderWinSpin:1{true};
AuUInt64bPreferNtSemaphoreSpinTryLock:1{true};
AuUInt64bPreferNtMutexSpinTryLock:1{true};
AuUInt64bPreferNtCondMutexSpinTryLock:1{false};
AuUInt64bPreferLinuxSemaphoreSpinTryLock:1{true};
AuUInt64bPreferLinuxMutexSpinTryLock:1{true};
AuUInt64bPreferLinuxCondMutexSpinTryLock:1{true};
#if 0
AuUInt64bPreferEmulatedWakeOnAddress:1{false};
#else
AuUInt64bPreferEmulatedWakeOnAddress:1{!AuBuild::kIsNtDerived/*everybody else requires us to hit the kernel. */};
#endif
AuUInt64bPreferWaitOnAddressAlwaysSpin:1{false};// ..., if emulated! if double-spinning under higher level locks, disable me.
AuUInt64bPreferWaitOnAddressAlwaysSpinNative:1{!AuBuild::kIsNtDerived};// ..., if not emulated! noting that most kernels and user-schedulers will spin for you
AuUInt64bWinXpThrough7BlazeOptimizerPower:12{300};// dont worry about it. we dont care about old portables. lets try to make older win32 targets tweak the scheduling in our favor a bit.