mirror of
https://github.com/redis/go-redis.git
synced 2025-07-29 17:41:15 +03:00
Add race test for BLPop
This commit is contained in:
@ -142,7 +142,7 @@ func redisRingOptions() *redis.RingOptions {
|
||||
}
|
||||
}
|
||||
|
||||
func perform(n int, cbs ...func(int)) {
|
||||
func performAsync(n int, cbs ...func(int)) *sync.WaitGroup {
|
||||
var wg sync.WaitGroup
|
||||
for _, cb := range cbs {
|
||||
for i := 0; i < n; i++ {
|
||||
@ -155,6 +155,11 @@ func perform(n int, cbs ...func(int)) {
|
||||
}(cb, i)
|
||||
}
|
||||
}
|
||||
return &wg
|
||||
}
|
||||
|
||||
func perform(n int, cbs ...func(int)) {
|
||||
wg := performAsync(n, cbs...)
|
||||
wg.Wait()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user