I also ran into a race diagnostic when I did an "Add" after my main
programs started "Wait"ing: I moved 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
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
Hello Jon
I think this is working as expected.
The relevant part of the doc is "calls with a positive delta that start
when the counter is greater than zero, may happen at any time".
This is what happens in your code (stdout on the left, my comments on the
right)
* here wg is