#include <FUSynchronizableObject.h>
Public Member Functions | |
virtual | ~FUSynchronizableObject () |
Destructor. | |
virtual void | Lock () |
Locks the object, blocking if another thread has locked it. | |
virtual void | Unlock () |
Unlocks the object, allowing other threads to lock it. |
A synchronizable object is an object that has the ability to lock itself so only one thread may be using it. This can be done by calling the Lock and Unlock methods of the object. Be sure to Lock and Unlock around all the critical sections of the object to ensure mutual exclusion.