http://msdn.microsoft.com/en-us/magazine/cc163744.aspx
For a lock to provide mutual exclusion for a region of memory, no writes to that memory can occur without entering the same lock. In a properly designed program, associated with every lock is a region of memory for which it provides mutual exclusion. Unfortunately, there is no obvious artifact of the code that makes this association clear, and yet this information is absolutely critical for anyone reasoning about the multithreaded behavior of the program.
what would be the ideal syntax? what comes to mind is
For a lock to provide mutual exclusion for a region of memory, no writes to that memory can occur without entering the same lock. In a properly designed program, associated with every lock is a region of memory for which it provides mutual exclusion. Unfortunately, there is no obvious artifact of the code that makes this association clear, and yet this information is absolutely critical for anyone reasoning about the multithreaded behavior of the program.
what would be the ideal syntax? what comes to mind is
object myLock = new object(); [Protected(myLock)] MyState myState;x-posted
(no subject)
Date: 2008-07-28 09:37 pm (UTC)