Исходники и презентации
This commit is contained in:
16
lessons/sync_primitives/wait_group_operations/main.go
Normal file
16
lessons/sync_primitives/wait_group_operations/main.go
Normal file
@ -0,0 +1,16 @@
|
||||
package main
|
||||
|
||||
import "sync"
|
||||
|
||||
func makeNegativeCounter() {
|
||||
wg := sync.WaitGroup{}
|
||||
wg.Add(-10)
|
||||
}
|
||||
|
||||
func waitZeroCounter() {
|
||||
wg := sync.WaitGroup{}
|
||||
wg.Wait()
|
||||
}
|
||||
|
||||
func main() {
|
||||
}
|
||||
Reference in New Issue
Block a user