Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Jun 22nd, 2018 68 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. concurrency := 15
  2. sem := make(chan bool, concurrency)
  3.  
  4. for _, username := range users {
  5.     sem <- true
  6.     go func(user string) {
  7.         doStuffToUser()
  8.     }(user)
  9. }
  10.  
  11. for i := 0; i < cap(sem); i++ {
  12.     sem <- true
  13. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top