I also ran into a race diagnostic  when I did and Add after my main 
programs started Waiting: I move the add to the main program and cured it.

I read this as the WaitGroup being careful and efficient about use of 
locking primitives, and not liking the expensive operation of incrementing 
a semaphore-like construct while someone is waiting for it to change 
towards zero. 

Logically, it's easy to prove correctness of a counter that increments to a 
value and then decrements to zero, and less easy to deal with one that 
jumps up and down (and maybe waves its arms in time with the music (;-))


>>

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