diff --git a/README.md b/README.md index c078046..b609cca 100644 --- a/README.md +++ b/README.md @@ -182,9 +182,9 @@ There was only the test of `ants` Pool because my computer was crash when it rea **As you can see, `ants` can up to 2x~6x faster than goroutines without pool and the memory consumption is reduced by 10 to 20 times.** -[1]: https://travis-ci.com/panjf2000/ants.svg?branch=master +[1]: https://travis-ci.com/panjf2000/ants.svg?branch=develop [2]: https://travis-ci.com/panjf2000/ants -[3]: https://codecov.io/gh/panjf2000/ants/branch/master/graph/badge.svg +[3]: https://codecov.io/gh/panjf2000/ants/branch/develop/graph/badge.svg [4]: https://codecov.io/gh/panjf2000/ants [5]: https://goreportcard.com/badge/github.com/panjf2000/ants [6]: https://goreportcard.com/report/github.com/panjf2000/ants diff --git a/README_ZH.md b/README_ZH.md index e06c36e..1ba7098 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -180,9 +180,9 @@ Go1.9 **从该demo测试吞吐性能对比可以看出,使用ants的吞吐性能相较于原生goroutine可以保持在2-6倍的性能压制,而内存消耗则可以达到10-20倍的节省优势。** -[1]: https://travis-ci.com/panjf2000/ants.svg?branch=master +[1]: https://travis-ci.com/panjf2000/ants.svg?branch=develop [2]: https://travis-ci.com/panjf2000/ants -[3]: https://codecov.io/gh/panjf2000/ants/branch/master/graph/badge.svg +[3]: https://codecov.io/gh/panjf2000/ants/branch/develop/graph/badge.svg [4]: https://codecov.io/gh/panjf2000/ants [5]: https://goreportcard.com/badge/github.com/panjf2000/ants [6]: https://goreportcard.com/report/github.com/panjf2000/ants diff --git a/ants_benchmark_test.go b/ants_benchmark_test.go index 416f2a7..daef33c 100644 --- a/ants_benchmark_test.go +++ b/ants_benchmark_test.go @@ -31,9 +31,9 @@ import ( ) const ( - RunTimes = 10000000 + RunTimes = 1000000 benchParam = 10 - benchAntsSize = 100000 + benchAntsSize = 200000 ) func demoFunc() error { diff --git a/pool.go b/pool.go index 36fe5cb..52a16f1 100644 --- a/pool.go +++ b/pool.go @@ -224,7 +224,7 @@ func (p *Pool) putWorker(worker *Worker) { worker.recycleTime = time.Now() p.lock.Lock() p.workers = append(p.workers, worker) - //通知有一个空闲的worker + // notify there is available worker p.cond.Signal() p.lock.Unlock() } diff --git a/pool_func.go b/pool_func.go index fbcbe9d..aff43cb 100644 --- a/pool_func.go +++ b/pool_func.go @@ -227,7 +227,7 @@ func (p *PoolWithFunc) putWorker(worker *WorkerWithFunc) { worker.recycleTime = time.Now() p.lock.Lock() p.workers = append(p.workers, worker) - //通知有一个空闲的worker + // notify there is available worker p.cond.Signal() p.lock.Unlock() }