concurrencydebugging
read-modify-write can lose updates
Anonymous
Two workers can read the same value, each add one, then write the same result. Use an atomic increment or protect the full read-and-write operation with a lock; protecting only one step leaves the race in place.
0