func doDecr(id string, signal chan int, client redis.AsyncClient, cnt int) { key := "ctr-" + id for i := 0; i < cnt; i++ { client.Decr(key) } signal <- 1 }
func doDecr(id string, signal chan int, client redis.AsyncClient, cnt int) { var fr redis.FutureInt64 key := "ctr-" + id for i := 0; i < cnt; i++ { fr, _ = client.Decr(key) } fr.Get() signal <- 1 }