| 84 | } |
| 85 | |
| 86 | void TRWMutex::TImpl::AcquireWrite() noexcept { |
| 87 | with_lock (Lock_) { |
| 88 | while (State_ != 0) { |
| 89 | ++BlockedWriters_; |
| 90 | WriteCond_.Wait(Lock_); |
| 91 | --BlockedWriters_; |
| 92 | } |
| 93 | |
| 94 | State_ = -1; |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | bool TRWMutex::TImpl::TryAcquireWrite() noexcept { |
| 99 | with_lock (Lock_) { |
no test coverage detected