MCPcopy
hub / github.com/redis/go-redis / Put

Method Put

internal/pool/pool.go:1202–1204  ·  view source on GitHub ↗
(ctx context.Context, cn *Conn)

Source from the content-addressed store, hash-verified

1200}
1201
1202func (p *ConnPool) Put(ctx context.Context, cn *Conn) {
1203 p.putConn(ctx, cn, true)
1204}
1205
1206// putConnWithoutTurn is an internal method that puts a connection back to the pool
1207// without freeing a turn. This is used when returning a rejected connection from

Calls 1

putConnMethod · 0.95

Tested by 8

BenchmarkPoolGetPutFunction · 0.76
TestDoubleFreeTurnBugFunction · 0.76
TestDoubleFreeTurnSimpleFunction · 0.76
BenchmarkPoolGetPutFunction · 0.76