I forgot to add - don't call `wg.Add(1)` inside the go routine - it is
racy! If you are trying to start a pool of go routines, you can find
that none of them get scheduled before you run the wg.Wait().

-- 
Nick Craig-Wood <n...@craig-wood.com> -- http://www.craig-wood.com/nick

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