mirror of
https://github.com/chai2010/advanced-go-programming-book.git
synced 2025-05-27 23:12:20 +00:00
1.5节例子修正
This commit is contained in:
parent
764d7446fd
commit
a8af695b92
@ -43,6 +43,8 @@ func worker(wg *sync.WaitGroup) {
|
||||
}
|
||||
|
||||
func main() {
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(2)
|
||||
go worker(&wg)
|
||||
go worker(&wg)
|
||||
wg.Wait()
|
||||
|
Loading…
x
Reference in New Issue
Block a user