mirror of https://github.com/panjf2000/ants.git
update example codes
This commit is contained in:
parent
93533b243b
commit
3e6386d097
|
@ -67,7 +67,7 @@ func main() {
|
||||||
|
|
||||||
// use the pool with a function
|
// use the pool with a function
|
||||||
// set 10 the size of goroutine pool
|
// set 10 the size of goroutine pool
|
||||||
p, _ := ants.NewPoolWithFunc(10, func(i interface{}) error {
|
p, _ := ants.NewPoolWithFunc(10, 1, func(i interface{}) error {
|
||||||
myFunc(i)
|
myFunc(i)
|
||||||
wg.Done()
|
wg.Done()
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue