aboutsummaryrefslogtreecommitdiff
path: root/fasthttputil
diff options
context:
space:
mode:
authorGravatar Erik Dubbelboer <erik@dubbelboer.com> 2019-10-16 00:22:48 +0200
committerGravatar Erik Dubbelboer <erik@dubbelboer.com> 2019-10-16 10:20:13 +0200
commit4ebe99396590efe0d250da0247825ab8308e9077 (patch)
tree6540e28a5f4dae7a9c432bc8f7fab592c0df1c28 /fasthttputil
parentfix 664 (#674) (diff)
downloadfasthttp-4ebe99396590efe0d250da0247825ab8308e9077.tar.gz
fasthttp-4ebe99396590efe0d250da0247825ab8308e9077.tar.bz2
fasthttp-4ebe99396590efe0d250da0247825ab8308e9077.zip
Document PipeConns not being safe for concurrent use
Diffstat (limited to 'fasthttputil')
-rw-r--r--fasthttputil/pipeconns.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/fasthttputil/pipeconns.go b/fasthttputil/pipeconns.go
index 8c4fab7..3e45c84 100644
--- a/fasthttputil/pipeconns.go
+++ b/fasthttputil/pipeconns.go
@@ -9,6 +9,8 @@ import (
)
// NewPipeConns returns new bi-directional connection pipe.
+//
+// PipeConns is NOT safe for concurrent use by multiple goroutines!
func NewPipeConns() *PipeConns {
ch1 := make(chan *byteBuffer, 4)
ch2 := make(chan *byteBuffer, 4)
@@ -38,6 +40,7 @@ func NewPipeConns() *PipeConns {
// calling Read in order to unblock each Write call.
// * It supports read and write deadlines.
//
+// PipeConns is NOT safe for concurrent use by multiple goroutines!
type PipeConns struct {
c1 pipeConn
c2 pipeConn