Commit f693015b authored by Marcel van Lohuizen's avatar Marcel van Lohuizen

sync: don't assume b.N > 0

Change-Id: I6eb91ea73ef887b025e5a8de1dd55f30618e1aa6
Reviewed-on: https://go-review.googlesource.com/20857Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent a5cd53a9
......@@ -25,6 +25,9 @@ func BenchmarkSemaUncontended(b *testing.B) {
}
func benchmarkSema(b *testing.B, block, work bool) {
if b.N == 0 {
return
}
sem := uint32(0)
if block {
done := make(chan bool)
......
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