1
0
mirror of https://github.com/golang/go synced 2024-11-25 03:07:56 -07:00

runtime: stop deadlock test properly (fix arm5 build)

TBR=r
CC=golang-dev
https://golang.org/cl/4446058
This commit is contained in:
Russ Cox 2011-04-22 15:22:11 -04:00
parent d5864454dc
commit 781df132f9

View File

@ -9,9 +9,15 @@ import (
"testing"
)
var stop = make(chan bool, 1)
func perpetuumMobile() {
select {
case <-stop:
default:
go perpetuumMobile()
}
}
func TestStopTheWorldDeadlock(t *testing.T) {
runtime.GOMAXPROCS(3)
@ -29,4 +35,5 @@ func TestStopTheWorldDeadlock(t *testing.T) {
}()
go perpetuumMobile()
<-compl
stop <- true
}