Unlock a read lock. Should be called only on a goroutine which has gotten a non-error return value from RLock().
()
| 70 | // Should be called only on a goroutine which has gotten a non-error return |
| 71 | // value from RLock(). |
| 72 | func (rw *BoundedRWLock) RUnlock() { |
| 73 | rw.control.Lock() |
| 74 | rw.readers-- |
| 75 | if rw.readers == 0 { |
| 76 | rw.processQueue() |
| 77 | } |
| 78 | rw.control.Unlock() |
| 79 | } |
| 80 | |
| 81 | // Lock for writing, waiting up to 'timeout' for successful exclusive |
| 82 | // acquisition of the lock. |