Stores an object of type T behind a mutex-locked shield. More...
#include <Lockable.h>
Public Member Functions | |
| T & | UnsafeGetValue () |
| Ignores the mutex guard and directly returns a reference to the locked value. | |
| const T & | UnsafeGetValue () const |
| Ignores the mutex guard and directly returns a reference to the locked value. | |
Stores an object of type T behind a mutex-locked shield.
To access the object, one has to acquire a lock to it first, and remember to free the lock when done. Use
| T& kNet::Lockable< T >::UnsafeGetValue | ( | ) | [inline] |
Ignores the mutex guard and directly returns a reference to the locked value.
Warning: This is unsafe for threading. Call only when the other threads accessing the data have been finished, or if you can guarantee by other means that the data will not be accessed.
Referenced by kNet::MessageConnection::Close().
| const T& kNet::Lockable< T >::UnsafeGetValue | ( | ) | const [inline] |
Ignores the mutex guard and directly returns a reference to the locked value.
Warning: This is unsafe for threading. Call only when the other threads accessing the data have been finished, or if you can guarantee by other means that the data will not be accessed.
1.7.1