We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 129820a commit ddd44f2Copy full SHA for ddd44f2
src/libraries/System.Private.CoreLib/src/System/Threading/ReaderWriterLockSlim.cs
@@ -1412,7 +1412,8 @@ public int RecursiveWriteCount
1412
1413
public int WaitingUpgradeCount => (int)_numUpgradeWaiters;
1414
1415
- public int WaitingWriteCount => (int)_numWriteWaiters;
+ // Include the thread that may be waiting in upgradable mode.
1416
+ public int WaitingWriteCount => (int)_numWriteWaiters + (int)_numWriteUpgradeWaiters;
1417
1418
private struct SpinLock
1419
{
0 commit comments