]> Cypherpunks repositories - gostls13.git/commitdiff
io: more docs on WriterAt
authorBrad Fitzpatrick <bradfitz@golang.org>
Wed, 7 Mar 2012 18:54:04 +0000 (10:54 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 7 Mar 2012 18:54:04 +0000 (10:54 -0800)
Updates #1599

R=golang-dev, gri, rsc
CC=golang-dev
https://golang.org/cl/5774043

src/pkg/io/io.go

index 7074834d6137f1aad12b0fd3cd919216efe71ce9..629b9fb75feb1f6ebcc2c1af7bfdf22de7496144 100644 (file)
@@ -173,6 +173,13 @@ type ReaderAt interface {
 // at offset off.  It returns the number of bytes written from p (0 <= n <= len(p))
 // and any error encountered that caused the write to stop early.
 // WriteAt must return a non-nil error if it returns n < len(p).
+//
+// If WriteAt is writing to a destination with a seek offset,
+// WriteAt should not affect nor be affected by the underlying
+// seek offset.
+//
+// Clients of WriteAt can execute parallel WriteAt calls on the same
+// destination if the ranges are not overlapping.
 type WriterAt interface {
        WriteAt(p []byte, off int64) (n int, err error)
 }