diff options
Diffstat (limited to 'src/pkg/sync/mutex_test.go')
| -rw-r--r-- | src/pkg/sync/mutex_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/sync/mutex_test.go b/src/pkg/sync/mutex_test.go index f5c20ca49..9bfdec365 100644 --- a/src/pkg/sync/mutex_test.go +++ b/src/pkg/sync/mutex_test.go @@ -43,7 +43,7 @@ func BenchmarkContendedSemaphore(b *testing.B) { s := new(uint32) *s = 1 c := make(chan bool) - runtime.GOMAXPROCS(2) + defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(2)) b.StartTimer() go HammerSemaphore(s, b.N/2, c) @@ -81,7 +81,7 @@ func BenchmarkContendedMutex(b *testing.B) { b.StopTimer() m := new(Mutex) c := make(chan bool) - runtime.GOMAXPROCS(2) + defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(2)) b.StartTimer() go HammerMutex(m, b.N/2, c) |
