Thread-local pointer, the one that will be different in every thread, API based portable implementation.
More...
template<class T>
class MThreadLocalPointer< T >
Thread-local pointer, the one that will be different in every thread, API based portable implementation.
There are three opportunities for the user to use Thread local storage:
- Use this thread local pointer class, which is the most portable way.
- Use native compiler declaration by utilizing the macro M_THREAD_LOCAL_STORAGE_VARIABLE.
- Use macro M_THREAD_LOCAL_POINTER that attempts to be efficient on platforms that support approach 2, while rolling back to approach 1 on less efficient platforms.
- See also
- M_THREAD_LOCAL_STORAGE_VARIABLE Efficient approach, less portable.
-
M_THREAD_LOCAL_POINTER Efficient on platforms that support thread local variable, portable otherwise.
-
M__USE_THREAD_LOCAL_POINTER Macro that determines which approach is used by M_THREAD_LOCAL_POINTER.
Constructor that does not initialize the value of the pointer.
The value of the pointer will remain undefined until the assignment operator is called.
Copy constructor that takes another thread local pointer.
- Parameters
-
other | Other object of the same type or its child. |
Return the pointer that is associated with this thread local pointer class.
This makes possible the pointer-like behavior of this class.
Return the reference to client object associated with this pointer class.
This makes possible the pointer-like behavior of this class.
Return the constant reference to client object associated with this shared pointer class.
This makes possible the pointer-like behavior of this class.
Dereference the pointer that is associated with this class.
This makes possible the pointer-like behavior of this class.
Dereference the constant pointer that is associated with this shared pointer class.
This makes possible the pointer-like behavior of this class.
Assignment operator that takes another thread local pointer.
The operator returns void, and the chaining of a few of them is impossible.
- Parameters
-
other | Other object of the same type or its child. |
Assignment operator that takes a pointer.
The operator returns void, and the chaining of a few of them is impossible.