diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/ReaderWriterLockSlim.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/ReaderWriterLockSlim.cs index 0f92e06088f2d4..828222db0082b3 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/ReaderWriterLockSlim.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/ReaderWriterLockSlim.cs @@ -1412,7 +1412,8 @@ public int RecursiveWriteCount public int WaitingUpgradeCount => (int)_numUpgradeWaiters; - public int WaitingWriteCount => (int)_numWriteWaiters; + // Include the thread that may be waiting in upgradable mode. + public int WaitingWriteCount => (int)_numWriteWaiters + (int)_numWriteUpgradeWaiters; private struct SpinLock {