diff options
| author | Ondřej Surý <ondrej@sury.org> | 2011-06-28 15:28:34 +0200 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2011-06-28 15:28:34 +0200 |
| commit | 8d00b02d82d86abe51773dc2c1751843bb538ae5 (patch) | |
| tree | 6656d166a046fc751548e88f071fedbeb9355443 /src/pkg/sync/mutex_test.go | |
| parent | c29cace1e8f3260389ea78fa4ef86d80cd5e5275 (diff) | |
| download | golang-8d00b02d82d86abe51773dc2c1751843bb538ae5.tar.gz | |
Imported Upstream version 2011.06.23upstream-weekly/2011.06.23
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) |
