Skip to content

Commit b60d47d

Browse files
committed
Tweak comments
1 parent eca1bb6 commit b60d47d

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

redis.go

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -551,9 +551,11 @@ func txPipelineReadQueued(rd *proto.Reader, statusCmd *StatusCmd, cmds []Cmder)
551551

552552
//------------------------------------------------------------------------------
553553

554-
// Client is a Redis client representing a pool of zero or more
555-
// underlying connections. It's safe for concurrent use by multiple
556-
// goroutines.
554+
// Client is a Redis client representing a pool of zero or more underlying connections.
555+
// It's safe for concurrent use by multiple goroutines.
556+
//
557+
// Client creates and frees connections automatically; it also maintains a free pool
558+
// of idle connections. You can control the pool size with Config.PoolSize option.
557559
type Client struct {
558560
*baseClient
559561
cmdable
@@ -729,7 +731,11 @@ type conn struct {
729731
hooks // TODO: inherit hooks
730732
}
731733

732-
// Conn is like Client, but its pool contains single connection.
734+
// Conn represents a single Redis connection rather than a pool of database connections.
735+
// It's safe for concurrent use by multiple goroutines.
736+
737+
// Prefer running commands from Client unless there is a specific need for a continuous
738+
// single Redis connection.
733739
type Conn struct {
734740
*conn
735741
ctx context.Context

0 commit comments

Comments
 (0)