📝Update example code

This commit is contained in:
Andy Pan 2019-08-19 16:16:42 +08:00
parent 08d01b6b48
commit 6851895376
1 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ func main() {
}
for i := 0; i < runTimes; i++ {
wg.Add(1)
ants.Submit(syncCalculateSum)
_ = ants.Submit(syncCalculateSum)
}
wg.Wait()
fmt.Printf("running goroutines: %d\n", ants.Running())
@ -73,7 +73,7 @@ func main() {
// Submit tasks one by one.
for i := 0; i < runTimes; i++ {
wg.Add(1)
p.Invoke(int32(i))
_ = p.Invoke(int32(i))
}
wg.Wait()
fmt.Printf("running goroutines: %d\n", p.Running())