1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-29 17:41:15 +03:00

Extract pool package. Add pool benchmark.

This commit is contained in:
Vladimir Mihailenco
2016-03-12 10:52:13 +02:00
parent aad45610b0
commit ad0739be99
25 changed files with 969 additions and 898 deletions

View File

@ -3,6 +3,8 @@ package redis
import (
"sync"
"sync/atomic"
"gopkg.in/redis.v3/internal/pool"
)
// Pipeline implements pipelining as described in
@ -110,8 +112,8 @@ func (pipe *Pipeline) Exec() (cmds []Cmder, retErr error) {
return cmds, retErr
}
func execCmds(cn *conn, cmds []Cmder) ([]Cmder, error) {
if err := cn.writeCmds(cmds...); err != nil {
func execCmds(cn *pool.Conn, cmds []Cmder) ([]Cmder, error) {
if err := writeCmd(cn, cmds...); err != nil {
setCmdsErr(cmds, err)
return cmds, err
}