We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b3415c commit 1fac6fbCopy full SHA for 1fac6fb
_examples/stress/main.go
@@ -29,7 +29,11 @@ func main() {
29
}
30
var wg sync.WaitGroup
31
// passed wg will be accounted at p.Wait() call
32
- p := mpb.New(mpb.WithWaitGroup(&wg), mpb.WithDebugOutput(os.Stderr))
+ p := mpb.New(
33
+ mpb.WithWaitGroup(&wg),
34
+ mpb.WithDebugOutput(os.Stderr),
35
+ mpb.WithQueueLen(totalBars), // totalBars is known ahead of time so overriding default queue len is good idea
36
+ )
37
wg.Add(totalBars)
38
39
for i := 0; i < totalBars; i++ {
0 commit comments