SHARE
TWEET

Untitled

a guest Aug 19th, 2019 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ...
  2. result := []int{}
  3. wg sync.WaitGroup
  4.  
  5. exampleInsert := []int{1,2,3,4,5,6,7,8,9,10}
  6.  
  7. for i:=0; i < 100; i ++ {
  8.     wg.add(1)
  9.     go func() {
  10.         defer wg.Done()
  11.         result = append(result, exampleInsert ...)
  12.         }
  13.     }()
  14. }
  15. wg.Wait()
  16. fmt.Println("size is not 1000! its %d", len(result))
  17. ...
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top