← Back to Question List
Python Quiz #60
Two Threads One Counter
Two threads each add 1 to a shared counter 100,000 times, and the final value often comes out below 200,000. What went wrong, and what does a Lock fix?