We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7f35484 commit 52a2be9Copy full SHA for 52a2be9
2 files changed
cc.go
@@ -8,19 +8,6 @@ import (
8
9
// Pool manages a pool of concurrent workers. It works a bit like a Waitgroup, but with error reporting and concurrency limits
10
// You create one with New, and run functions with Run. Then you wait on it like a regular WaitGroup.
11
-//
12
-// Example:
13
14
-// p := cc.New(4)
15
-// p.Run(func() error {
16
-// afunction()
17
-// return nil
18
-// })
19
-// errs := p.Wait()
20
21
-// for err := range errs {
22
23
-// }
24
type Pool struct {
25
errors multierror.ConcurrentAccumulator
26
cc_test.go
@@ -9,7 +9,7 @@ import (
"github.com/codeclysm/cc"
)
-func Example() {
+func ExamplePool() {
p := cc.New(4)
p.Run(func() error {
time.Sleep(1 * time.Second)
0 commit comments