From f1a9ef9c1b9dffea52f3f8d3b4be70953f08d785 Mon Sep 17 00:00:00 2001 From: Fu Wei Date: Thu, 29 Dec 2022 01:59:01 +0800 Subject: [PATCH] stream: update ServerStream.SendMsg doc (#5894) --- stream.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stream.go b/stream.go index 175aee958..93231af2a 100644 --- a/stream.go +++ b/stream.go @@ -1483,6 +1483,9 @@ type ServerStream interface { // It is safe to have a goroutine calling SendMsg and another goroutine // calling RecvMsg on the same stream at the same time, but it is not safe // to call SendMsg on the same stream in different goroutines. + // + // It is not safe to modify the message after calling SendMsg. Tracing + // libraries and stats handlers may use the message lazily. SendMsg(m interface{}) error // RecvMsg blocks until it receives a message into m or the stream is // done. It returns io.EOF when the client has performed a CloseSend. On