#include <ThreadLocal.h>
Classes | |
struct | ThreadIdAndValue |
Public Member Functions | |
void | ForEach (std::function< void(std::thread::id, T &)> f) |
T & | local () |
ThreadLocal (int capacity) | |
ThreadLocal (int capacity, Initialize initialize) | |
ThreadLocal (int capacity, Initialize initialize, Release release) | |
~ThreadLocal () | |
Private Member Functions | |
T & | SpilledLocal (std::thread::id this_thread) |
Private Attributes | |
const int | capacity_ |
MaxSizeVector< ThreadIdAndValue > | data_ |
std::atomic< int > | filled_records_ |
Initialize | initialize_ |
std::mutex | mu_ |
std::unordered_map< std::thread::id, T > | per_thread_map_ |
MaxSizeVector< std::atomic< ThreadIdAndValue * > > | ptr_ |
Release | release_ |
Definition at line 115 of file ThreadLocal.h.
|
inlineexplicit |
Definition at line 121 of file ThreadLocal.h.
|
inline |
Definition at line 125 of file ThreadLocal.h.
|
inline |
Definition at line 129 of file ThreadLocal.h.
|
inline |
Definition at line 237 of file ThreadLocal.h.
|
inline |
Definition at line 217 of file ThreadLocal.h.
|
inline |
Definition at line 143 of file ThreadLocal.h.
|
inlineprivate |
Definition at line 263 of file ThreadLocal.h.
|
private |
Definition at line 279 of file ThreadLocal.h.
|
private |
Definition at line 283 of file ThreadLocal.h.
|
private |
Definition at line 290 of file ThreadLocal.h.
|
private |
Definition at line 277 of file ThreadLocal.h.
|
private |
Definition at line 295 of file ThreadLocal.h.
|
private |
Definition at line 296 of file ThreadLocal.h.
|
private |
Definition at line 287 of file ThreadLocal.h.
|
private |
Definition at line 278 of file ThreadLocal.h.