lock(typeof(MyClass))

I was in a code review this week, and we came across the mistake of locking the type of a static class for thread sychronization (probably because it was documented in MSDN to do it this way).

http://msdn.microsoft.com/library/default.asp?url=/archive/en-us/dnaraskdr/html/askgui06032003.asp

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
«November»
SunMonTueWedThuFriSat
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011