Go to the documentation of this file.
9 #ifndef mrpt_synch_threadsafevar_H
10 #define mrpt_synch_threadsafevar_H
58 void get(T &out_val)
const
65 operator T(
void)
const
72 void set(
const T &new_val)
82 std::swap(in_out_var,
m_val);
virtual ~CThreadSafeVariable()
A template for created thread-safe variables with an internal critical section controlled each read o...
A class acquiring a CCriticalSection at its constructor, and releasing it at destructor.
T get() const
Return a copy of the hold variable.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
void set(const T &new_val)
Return a copy of the hold variable.
This class provides simple critical sections functionality.
void get(T &out_val) const
Return a copy of the hold variable.
void swap(T &in_out_var)
Swap the current value of the hold variable and the passed one, as one atomic operation.
CThreadSafeVariable(const T &init_val)
Page generated by Doxygen 1.8.20 for MRPT 1.4.0 SVN: at Thu Aug 27 02:40:23 UTC 2020 | | |