Skip to content

Commit 52a2be9

Browse files
committed
Fix examples
1 parent 7f35484 commit 52a2be9

2 files changed

Lines changed: 1 addition & 14 deletions

File tree

cc.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,6 @@ import (
88

99
// Pool manages a pool of concurrent workers. It works a bit like a Waitgroup, but with error reporting and concurrency limits
1010
// 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-
// }
2411
type Pool struct {
2512
errors multierror.ConcurrentAccumulator
2613

cc_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/codeclysm/cc"
1010
)
1111

12-
func Example() {
12+
func ExamplePool() {
1313
p := cc.New(4)
1414
p.Run(func() error {
1515
time.Sleep(1 * time.Second)

0 commit comments

Comments
 (0)