Skip to content

Commit

Permalink
doc: pass ctx in example for infinite wait time (redis#2540)
Browse files Browse the repository at this point in the history
Co-authored-by: Monkey <[email protected]>
  • Loading branch information
pranitbauva1997 and monkey92t authored Apr 5, 2023
1 parent 842b65f commit a42ba14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a42ba14

Please sign in to comment.