Skip to content

Instantly share code, notes, and snippets.

@kandalf
Created December 30, 2014 12:20
Show Gist options
  • Save kandalf/5b26770afee5418b6fa8 to your computer and use it in GitHub Desktop.
Save kandalf/5b26770afee5418b6fa8 to your computer and use it in GitHub Desktop.
package main
import "log"
func main() {
redisDB := &RedisDB{LogFilePath: "./redis-incr.log"}
redisDB.Connect("127.0.0.1:6379", "1")
redisDB.SetupDB()
for i := 0; i < 3000; i++ {
go func(){ redisDB.IncrementEx("INCR:TEST", 10) }()
}
log.Printf("INCR: %s", redisDB.Fetch("INCR:TEST"))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment