Commit 1163127d authored by Dmitriy Vyukov's avatar Dmitriy Vyukov

testing: diagnose a potential misuse of RunParallel

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/68030043
parent 96d52298
......@@ -417,6 +417,9 @@ func (b *B) RunParallel(body func(*PB)) {
}()
}
wg.Wait()
if n == 0 {
b.Fatal("RunParallel body did not not call PB.Next")
}
}
// SetParallelism sets the number of goroutines used by RunParallel to p*GOMAXPROCS.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment