A test framework for verifying concurrency anomalies

I would place the waitgroup above the mutex and just comment saying that it protects the fields below.