mirror of https://github.com/go-redis/redis.git
doc: pass ctx in example for infinite wait time (#2540)
Co-authored-by: Monkey <golang@88.com>
This commit is contained in:
parent
842b65fb60
commit
a42ba14851
|
@ -227,7 +227,7 @@ func ExampleClient_BLPop() {
|
|||
panic(err)
|
||||
}
|
||||
|
||||
// use `rdb.BLPop(0, "queue")` for infinite waiting time
|
||||
// use `rdb.BLPop(ctx, 0, "queue")` for infinite waiting time
|
||||
result, err := rdb.BLPop(ctx, 1*time.Second, "queue").Result()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
|
Loading…
Reference in New Issue