|
uvw
2.0.0
|
The ThreadLocalStorage wrapper. More...
#include <thread.hpp>


Public Member Functions | |
| template<typename T > | |
| T * | get () noexcept |
| Gets the value of a given variable. More... | |
| template<typename T > | |
| void | set (T *value) noexcept |
| Sets the value of a given variable. More... | |
Public Member Functions inherited from uvw::UnderlyingType< ThreadLocalStorage, uv_key_t > | |
| Loop & | loop () const noexcept |
| Gets the loop from which the resource was originated. More... | |
| const uv_key_t * | raw () const noexcept |
| Gets the underlying raw data structure. More... | |
| uv_key_t * | raw () noexcept |
| Gets the underlying raw data structure. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from uvw::UnderlyingType< ThreadLocalStorage, uv_key_t > | |
| static std::shared_ptr< ThreadLocalStorage > | create (Args &&... args) |
| Creates a new resource of the given type. More... | |
The ThreadLocalStorage wrapper.
A storage area that can only be accessed by one thread. The variable can be seen as a global variable that is only visible to a particular thread and not the whole program.
Definition at line 134 of file thread.hpp.
|
inlinenoexcept |
Gets the value of a given variable.
| T | Type to which to cast the opaque storage area. |
Definition at line 152 of file thread.hpp.
|
inlinenoexcept |
Sets the value of a given variable.
| T | Type of the variable to store aside. |
| value | A valid pointer to the variable to store |
Definition at line 162 of file thread.hpp.
1.8.13