فهرست منبع

websocket: Be explicit about goroutine safety

Specifically state that it is safe to call methods on Conn from multiple
goroutines in the docs.

Fixes #6692

Change-Id: I1b0e8812ca5b2e3ca72948c5404d569879e54f34
Reviewed-on: https://go-review.googlesource.com/20455
Reviewed-by: Andrew Gerrand <adg@golang.org>
Sam Whited 9 سال پیش
والد
کامیت
3e5cd1ed14
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 2 0
      websocket/websocket.go

+ 2 - 0
websocket/websocket.go

@@ -144,6 +144,8 @@ type frameHandler interface {
 }
 
 // Conn represents a WebSocket connection.
+//
+// Multiple goroutines may invoke methods on a Conn simultaneously.
 type Conn struct {
 	config  *Config
 	request *http.Request