Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
x/net/websocket: Document goroutine safety of websocket.Conn #6692
The documentation of websocket.Conn does not state that it is safe to share it among multiple goroutines. From the implementation (rio and wio mutexes), it appears that it is safe. It'll be convenient if this is explicitly stated like in the case of net.Conn in stdlib.  - http://godoc.org/code.google.com/p/go.net/websocket#Conn
Found this: http://stackoverflow.com/questions/10986008/is-websocket-send-receive-thread-safe-go-routine-safe "Yes, you can call Send, Receive and Close on a websocket connection concurrently, like you can with all net.Conn's in Go. A short excerpt from the official docs:" Multiple goroutines may invoke methods on a Conn simultaneously.