2 comments
dpeterson
3/7/2012 11:29:46 AM
The lock statement doesn't really have anything to do with this scenario, the real problem lies with asynchrony.
razamit
3/7/2012 11:38:40 AM
That is part true. The threads are created in the order of the numbers. People tend to think that the first thread to reach the lock is going to be the first one out of it, that is very wrong!