Click here to Skip to main content
15,887,312 members

Comments by usernameCasper (Top 1 by date)

usernameCasper 11-Jan-11 13:30pm View    
Deleted
Reason for my vote of 1
What's the point of making this article?

It's obvious you did it wrong the first time by not making a locker variable, which locks crucial codeblocks, and is seen by every thread who got access to it, as clearly stated in every documentation about threads...

Second, in your solution, you initialized _lockThis without the attribute readonly, which is important in multithreading environments.

Third, I honestly don't think many developers fall in this trap. I never ever heard someone falls in for this. Most traps occur when code gets complexed and / or developers share their code.