Pergunta de entrevista da empresa Gro Intelligence

With a very simple incrementing variable, what happens when we add threads to the program? How can we ensure things work correctly? After being shown any number of naive approaches to locking, which ones would work?