diff options
Diffstat (limited to 'Godeps/_workspace/src/github.com/garyburd/redigo/redis/pool.go')
-rw-r--r-- | Godeps/_workspace/src/github.com/garyburd/redigo/redis/pool.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Godeps/_workspace/src/github.com/garyburd/redigo/redis/pool.go b/Godeps/_workspace/src/github.com/garyburd/redigo/redis/pool.go index 9daf2e33f..d66ef84b6 100644 --- a/Godeps/_workspace/src/github.com/garyburd/redigo/redis/pool.go +++ b/Godeps/_workspace/src/github.com/garyburd/redigo/redis/pool.go @@ -94,7 +94,10 @@ var ( type Pool struct { // Dial is an application supplied function for creating and configuring a - // connection + // connection. + // + // The connection returned from Dial must not be in a special state + // (subscribed to pubsub channel, transaction started, ...). Dial func() (Conn, error) // TestOnBorrow is an optional application supplied function for checking @@ -116,7 +119,7 @@ type Pool struct { // the timeout to a value less than the server's timeout. IdleTimeout time.Duration - // If Wait is true and the pool is at the MaxIdle limit, then Get() waits + // If Wait is true and the pool is at the MaxActive limit, then Get() waits // for a connection to be returned to the pool before returning. Wait bool @@ -135,8 +138,9 @@ type idleConn struct { t time.Time } -// NewPool creates a new pool. This function is deprecated. Applications should -// initialize the Pool fields directly as shown in example. +// NewPool creates a new pool. +// +// Deprecated: Initialize the Pool directory as shown in the example. func NewPool(newFn func() (Conn, error), maxIdle int) *Pool { return &Pool{Dial: newFn, MaxIdle: maxIdle} } |