Esempio n. 1
0
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
}
Esempio n. 2
0
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
}