Skip to content

Commit a9a224c

Browse files
authored
docs: clearer doc for linkBufferNode mode (#331)
1 parent 37e4d10 commit a9a224c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

nocopy.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,12 @@ const (
261261
minReuseBytes = 64 // only reuse bytes if n >= minReuseBytes
262262

263263
defaultLinkBufferMode = 0
264-
// readonly mode indicate that the buffer node memory is not controlled by itself,
265-
// so we cannot reuse the buffer or nocopy read it, default value is false.
264+
// readonlyMask is used to set readonly mode,
265+
// which indicate that the buffer node memory is not controlled by itself,
266+
// so we cannot reuse the buffer or nocopy read it.
266267
readonlyMask uint8 = 1 << 0 // 0000 0001
267-
// nocopyRead mode indicate that the buffer node has been no copy read and cannot reuse the buffer, default value is false.
268+
// readonlyMask is used to set nocopyRead mode,
269+
// which indicate that the buffer node has been no copy read and cannot reuse the buffer.
268270
nocopyReadMask uint8 = 1 << 1 // 0000 0010
269271
)
270272

0 commit comments

Comments
 (0)