At bottom part of this article: https://golang.org/ref/mem 

Should(incorrect idiom):

var a string
var done bool

func setup() {
        a = "hello, world"
        done = true
}

func main() {
        go setup()
        for !done {
        }
        print(a)
}


be:

var a string
var done bool

func setup() {
        done = true

        a = "hello, world"
}

func main() {
        go setup()
        for !done {
        }
        print(a)
}


Or am i misunderstanding some thing?

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to