Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 5th, 2012  |  syntax: None  |  size: 0.18 KB  |  hits: 6  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Should a lock variable be declared volatile?
  2. private readonly object ownerLock_ = new object();
  3.  
  4. lock (ownerLock_)
  5. {
  6. }
  7.        
  8. private readonly volatile object ownerLock_ = new object();