[go-nuts] Re: Is it safe to call WaitGroup.Add concurrently from multiple go routines?

2017-01-01 Thread San
Thank you I reread the document and still not quite sure if the function is safe to be called concurrently. So I try the race detector which is not outputting any report. (Mean safe I supposed.) Finally, I look at the source code which I found sync/atomic usage for counter manipulation so I sure

[go-nuts] Is it safe to call WaitGroup.Add concurrently from multiple go routines?

2017-01-01 Thread San
I don't see any mention about the safety of using WaitGroup from multiple goroutines in godoc. I stumble upon "new Add calls must happen after all previous Wait calls have returned." but given the use case of WaitGroup and the function name I am not quite sure about it. For example in the last

[go-nuts] I see the usage of interface{} everywhere why don't it get declare in standard library and given a common name?

2016-12-30 Thread San
I have a question. Since the usage of the blank interface is so popular. Why does it not get declared in the standard library? -- 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