WriteAt itself is goroutine safe, thus just needs to acquire a read-lock to prevent closing concurrently (see SyncClose).
(p []byte, off int64)
| 106 | // WriteAt itself is goroutine safe, thus just needs to acquire a read-lock to |
| 107 | // prevent closing concurrently (see SyncClose). |
| 108 | func (w *lockedWriterAt) WriteAt(p []byte, off int64) (n int, err error) { |
| 109 | w.mut.RLock() |
| 110 | defer w.mut.RUnlock() |
| 111 | return w.fd.WriteAt(p, off) |
| 112 | } |
| 113 | |
| 114 | // SyncClose ensures that no more writes are happening before going ahead and |
| 115 | // syncing and closing the fd, thus needs to acquire a write-lock. |
no outgoing calls
no test coverage detected