ReadUnlock gives other goroutines waiting to read their opporunity.
(reader int)
| 226 | |
| 227 | // ReadUnlock gives other goroutines waiting to read their opporunity. |
| 228 | func (rw *readerWriter) ReadUnlock(reader int) { |
| 229 | // Release the buffer back into the semaphore channel. |
| 230 | rw.readerControl.Release(1) |
| 231 | } |
| 232 | |
| 233 | // WriteLock blocks all reading so the write can happen safely. |
| 234 | func (rw *readerWriter) WriteLock() { |