common::SafeData< T > Class Template Reference
#include <thread.h>
Detailed Description
template<typename T>
class common::SafeData< T >
Definition at line 44 of file thread.h.
Constructor & Destructor Documentation
Constructors and destructors.
Definition at line 48 of file thread.h.
00049 {
00050 g_static_rw_lock_init(&rw_lock);
00051 }
Definition at line 52 of file thread.h.
00053 {
00054 g_static_rw_lock_free(&rw_lock);
00055 }
Member Function Documentation
Safely get the value.
Definition at line 58 of file thread.h.
00059 {
00060
00061 g_static_rw_lock_reader_lock(&rw_lock);
00062 T tmp = data;
00063 g_static_rw_lock_reader_unlock(&rw_lock);
00064
00065 return tmp;
00066 }
Safely set the value.
Definition at line 69 of file thread.h.
00070 {
00071 g_static_rw_lock_writer_lock(&rw_lock);
00072 data = new_value;
00073 g_static_rw_lock_writer_unlock(&rw_lock);
00074 }
The documentation for this class was generated from the following file: