protects a MonitoredObject against change.
Compare the locking with thread-locking tools:
1) The MonitoredObject has (should have) methods that make a method call sort-of atomic. You call it, and are guaranteed the whole operation succeeds safely without interruption.
2) Sometimes operations on MonitoredObject's are dependent on each other. For example, when you are iterating through a list. If changes in the list (size of list, or elements changing) are unacceptable, you need a tool to prevent any change. This is the MonitorLock.
Note that not releasing the lock will almost certainly stop the entire app, therefore the MonitorLock will always release when it goes out of scope. Most often though you want to release asap, therefore you'll often call unlockNow() immediately when done.
Beware: you cannot use the MonitorLock and still change the object, a DEADLOCK will be your reward. To write while reading, make a copy of the object, change it, and assign the object to that. The assignment operator of the object should be 'atomic' again, thanks to the assignment operator macros.
<>