mirror of
https://github.com/teivah/100-go-mistakes.git
synced 2026-06-27 03:46:58 +08:00
fix: wording
This commit is contained in:
parent
280343552e
commit
42221294dc
1 changed files with 2 additions and 2 deletions
|
|
@ -1704,7 +1704,7 @@ for i := 0; i < 3; i++ {
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
fmt.Println(v)
|
fmt.Println(v) // can print any value from 0 to 3.
|
||||||
```
|
```
|
||||||
To deterministically set the counter, the `wg.Add` should be called before spinning up the goroutine:
|
To deterministically set the counter, the `wg.Add` should be called before spinning up the goroutine:
|
||||||
```go
|
```go
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue