mirror of
https://github.com/panjf2000/ants.git
synced 2025-12-18 11:21:02 +00:00
🕊 Renew the example code
This commit is contained in:
parent
59a12f4593
commit
315bac653e
@ -73,7 +73,7 @@ func main() {
|
|||||||
// Submit tasks one by one.
|
// Submit tasks one by one.
|
||||||
for i := 0; i < runTimes; i++ {
|
for i := 0; i < runTimes; i++ {
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
p.Serve(int32(i))
|
p.Invoke(int32(i))
|
||||||
}
|
}
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
fmt.Printf("running goroutines: %d\n", p.Running())
|
fmt.Printf("running goroutines: %d\n", p.Running())
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user