I write some function and other things in the followings:
var a string
var once sync.Once

func setup() {
a = "hello,world"
}
func doprint() {
once.Do(setup)
fmt.Print(a)
}
func twoprint() {
go doprint()
go doprint()
}
     the quwstion is how can I make use of function twoprint()?? Thank you 
 for reading!

-- 
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