/// writable guard through the [`RwLockUpgradeableGuard::upgrade`](RwLockUpgradeableGuard::upgrade)
/// [`folly/RWSpinLock.h`](https://github.com/facebook/folly/blob/a0394d84f2d5c3e50ebfd0566f9d3acb52cfab5a/folly/synchronization/RWSpinLock.h).
/// This implementation is unfair to writers - if the lock always has readers, then no writers will
/// new readers are allowed when an upgradeable guard is held, but upgradeable guards can be taken
// We check the UPGRADED bit here so that new readers are prevented when an UPGRADED lock is held.
/// Upgrades can be done through the [`RwLockUpgradeableGuard::upgrade`](RwLockUpgradeableGuard::upgrade) method.
// We can't unflip the UPGRADED bit back just yet as there is another upgradeable or write lock.
/// Downgrades the upgradeable lock guard to a readable, shared lock guard. Cannot fail and is guaranteed not to spin.
/// Downgrades the writable lock guard to a readable, shared lock guard. Cannot fail and is guaranteed not to spin.
// The UPGRADED bit may be set if an upgradeable lock attempts an upgrade while this lock is held.