[*] optimization: cea33621 cont

This commit is contained in:
Reece Wilson 2023-09-09 14:38:02 +01:00
parent e7ec875851
commit 4ad70cadb4

View File

@ -559,7 +559,8 @@ namespace Aurora::Threading::Primitives
template<bool bIsWriteRecursionAllowed>
bool RWLockImpl<bIsWriteRecursionAllowed>::TryLockRead()
{
if (gRuntimeConfig.threadingConfig.bPreferRWLockReadLockSpin)
if (gRuntimeConfig.threadingConfig.bPreferRWLockReadLockSpin &&
AuAtomicLoad(&this->writersPending_) == 0)
{
return DoTryIf([=]()
{