1 Apr 2016 by Dave Kreskowiak
This problem cannot be solved by threading. Without using locking, you cannot guarantee the order in which threads run. You CAN get a thread order like 1, 2, 3, 1, 3, 2, 3, 1, 2, 1, ...Introducing locking to get the correct order just makes these threads execute synchronously, no different...