1
0
mirror of https://github.com/redis/go-redis.git synced 2025-12-03 18:31:14 +03:00
This commit is contained in:
Nedyalko Dyakov
2025-10-31 17:13:11 +02:00
parent f672885808
commit ffa32a5370
11 changed files with 948 additions and 102 deletions

View File

@@ -1175,11 +1175,11 @@ func (c *Client) Pipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmd
}
func (c *Client) Pipeline() Pipeliner {
pipe := Pipeline{
exec: pipelineExecer(c.processPipelineHook),
}
pipe := pipelinePool.Get().(*Pipeline)
pipe.exec = pipelineExecer(c.processPipelineHook)
pipe.cmds = getCmdSlice()
pipe.init()
return &pipe
return pipe
}
// AutoPipeline creates a new autopipeliner that automatically batches commands.