()
| 11 | ) |
| 12 | |
| 13 | func ExamplePool() { |
| 14 | p := New().WithMaxGoroutines(3) |
| 15 | for i := 0; i < 5; i++ { |
| 16 | p.Go(func() { |
| 17 | fmt.Println("conc") |
| 18 | }) |
| 19 | } |
| 20 | p.Wait() |
| 21 | // Output: |
| 22 | // conc |
| 23 | // conc |
| 24 | // conc |
| 25 | // conc |
| 26 | // conc |
| 27 | } |
| 28 | |
| 29 | func TestPool(t *testing.T) { |
| 30 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…