mirror of
https://github.com/redis/go-redis.git
synced 2025-06-12 14:21:52 +03:00
Clarify thread safety. Fixes #166.
This commit is contained in:
@ -1,9 +1,8 @@
|
||||
package redis
|
||||
|
||||
// Pipeline implements pipelining as described in
|
||||
// http://redis.io/topics/pipelining.
|
||||
//
|
||||
// Pipeline is not thread-safe.
|
||||
// http://redis.io/topics/pipelining. It's NOT safe for concurrent use
|
||||
// by multiple goroutines.
|
||||
type Pipeline struct {
|
||||
commandable
|
||||
|
||||
@ -36,6 +35,7 @@ func (pipe *Pipeline) process(cmd Cmder) {
|
||||
pipe.cmds = append(pipe.cmds, cmd)
|
||||
}
|
||||
|
||||
// Close closes the pipeline, releasing any open resources.
|
||||
func (pipe *Pipeline) Close() error {
|
||||
pipe.Discard()
|
||||
pipe.closed = true
|
||||
|
Reference in New Issue
Block a user