Skip to content

Instantly share code, notes, and snippets.

@gerep
Last active April 20, 2018 20:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gerep/2ce6a1f8b1e527c3dc60036a8d0dcb1d to your computer and use it in GitHub Desktop.
Save gerep/2ce6a1f8b1e527c3dc60036a8d0dcb1d to your computer and use it in GitHub Desktop.
for x := 0; x < 1000; x++ {
wg.Add(1)
go func() {
x := client.EvalSha(redisSha, []string{}, j)
if x.Err() == redis.Nil {
fmt.Println("No return")
} else if err != nil {
panic(err)
} else {
r, _ := x.Result()
fmt.Println("-->", r)
}
wg.Done()
}()
}
wg.Wait()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment