func main() {
runtime.GOMAXPROCS(1)
done := false
go func() {
done = true
}()
for !done {}
fmt.Println("finished")
}
func main() {
runtime.GOMAXPROCS(1)
done := false
go func() {
done = true
}()
for !done {}
fmt.Println("finished")
}