Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ...
- result := []int{}
- wg sync.WaitGroup
- exampleInsert := []int{1,2,3,4,5,6,7,8,9,10}
- for i:=0; i < 100; i ++ {
- wg.add(1)
- go func() {
- defer wg.Done()
- result = append(result, exampleInsert ...)
- }
- }()
- }
- wg.Wait()
- fmt.Println("size is not 1000! its %d", len(result))
- ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement