summaryrefslogtreecommitdiff
path: root/src/pkg/runtime/proc_test.go
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2011-06-30 15:34:22 +0200
committerOndřej Surý <ondrej@sury.org>2011-06-30 15:34:22 +0200
commitd39f5aa373a4422f7a5f3ee764fb0f6b0b719d61 (patch)
tree1833f8b72a4b3a8f00d0d143b079a8fcad01c6ae /src/pkg/runtime/proc_test.go
parent8652e6c371b8905498d3d314491d36c58d5f68d5 (diff)
downloadgolang-d39f5aa373a4422f7a5f3ee764fb0f6b0b719d61.tar.gz
Imported Upstream version 58upstream/58
Diffstat (limited to 'src/pkg/runtime/proc_test.go')
-rw-r--r--src/pkg/runtime/proc_test.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/pkg/runtime/proc_test.go b/src/pkg/runtime/proc_test.go
index a15b2d80a..cac4f9eea 100644
--- a/src/pkg/runtime/proc_test.go
+++ b/src/pkg/runtime/proc_test.go
@@ -24,20 +24,23 @@ func TestStopTheWorldDeadlock(t *testing.T) {
t.Logf("skipping during short test")
return
}
- runtime.GOMAXPROCS(3)
- compl := make(chan int, 1)
+ maxprocs := runtime.GOMAXPROCS(3)
+ compl := make(chan bool, 2)
go func() {
for i := 0; i != 1000; i += 1 {
runtime.GC()
}
- compl <- 0
+ compl <- true
}()
go func() {
for i := 0; i != 1000; i += 1 {
runtime.GOMAXPROCS(3)
}
+ compl <- true
}()
go perpetuumMobile()
<-compl
+ <-compl
stop <- true
+ runtime.GOMAXPROCS(maxprocs)
}