| 59 | } |
| 60 | |
| 61 | bool TRWMutex::TImpl::TryAcquireRead() noexcept { |
| 62 | with_lock (Lock_) { |
| 63 | if (BlockedWriters_ || State_ < 0) { |
| 64 | return false; |
| 65 | } |
| 66 | |
| 67 | ++State_; |
| 68 | } |
| 69 | |
| 70 | return true; |
| 71 | } |
| 72 | |
| 73 | void TRWMutex::TImpl::ReleaseRead() noexcept { |
| 74 | Lock_.Acquire(); |
no test coverage detected