From 56135c623a865c501ab31cc940c0e22ece2673f4 Mon Sep 17 00:00:00 2001 From: Ondřej Surý Date: Fri, 3 Jun 2011 11:31:24 +0200 Subject: Imported Upstream version 2011.06.02 --- src/pkg/runtime/proc_test.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/pkg/runtime/proc_test.go') 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) } -- cgit v1.2.3