From fdf34beb43cff44ac7c1fb0aebc9e28a05e2fe6c Mon Sep 17 00:00:00 2001 From: andy pan Date: Fri, 29 Jun 2018 10:59:02 +0800 Subject: [PATCH 1/2] add travis-ci badge --- README_ZH.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_ZH.md b/README_ZH.md index afa1290..a50e954 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -176,7 +176,7 @@ Memory : 8 GB 1867 MHz DDR3 **从该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://godoc.org/github.com/panjf2000/ants?status.svg [4]: https://godoc.org/github.com/panjf2000/ants From 109dc9b03a66b023b14eee16e5a43eb3b0e8fb67 Mon Sep 17 00:00:00 2001 From: andy pan Date: Mon, 2 Jul 2018 14:16:39 +0800 Subject: [PATCH 2/2] update example code --- examples/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/main.go b/examples/main.go index 413cb36..bbf7457 100644 --- a/examples/main.go +++ b/examples/main.go @@ -47,6 +47,8 @@ func demoFunc() error { } func main() { + defer ants.Release() + runTimes := 1000 // use the common pool @@ -70,6 +72,7 @@ func main() { wg.Done() return nil }) + defer p.Release() // submit tasks for i := 0; i < runTimes; i++ { wg.Add(1)