WriteUnlock releases the write lock and allows reads to occur.
()
| 241 | |
| 242 | // WriteUnlock releases the write lock and allows reads to occur. |
| 243 | func (rw *readerWriter) WriteUnlock() { |
| 244 | // Release all the buffers back into the semaphore channel. |
| 245 | rw.readerControl.Release(rw.maxReads) |
| 246 | |
| 247 | // Release the write lock. |
| 248 | rw.write.Done() |
| 249 | } |
| 250 | |
| 251 | // Acquire attempts to secure the specified number of buffers from the |
| 252 | // semaphore channel. |