]> Cypherpunks repositories - gostls13.git/commitdiff
regexp: document that Regexp is thread-safe.
authorRob Pike <r@golang.org>
Wed, 29 Jun 2011 05:41:09 +0000 (15:41 +1000)
committerRob Pike <r@golang.org>
Wed, 29 Jun 2011 05:41:09 +0000 (15:41 +1000)
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4667047

src/pkg/regexp/regexp.go

index 44da8b67107c3902c9287f5cf297049aa41bdfb6..e8d4c087cf8ec170b75b251276556510e5512aa8 100644 (file)
@@ -158,6 +158,7 @@ func (i *instr) print() {
 
 // Regexp is the representation of a compiled regular expression.
 // The public interface is entirely through methods.
+// A Regexp is safe for concurrent use by multiple goroutines.
 type Regexp struct {
        expr        string // the original expression
        prefix      string // initial plain text string