ThreadEntrySet is used to track all ThreadEntry that have a valid ElementWrapper for a particular TL id. The class provides no internal locking and caller must ensure safety of any access.
Synopsis
Declared in <folly/detail/ThreadLocalDetail.h>
struct ThreadEntrySet;
Types
Name |
Description |
Pairs a thread entry with the dispose info cached for it. |
Type Aliases
Name |
Description |
Vector of ThreadEntry for fast iteration during accessAllThreads. |
|
Map from ThreadEntry* to its slot in the threadElements vector to be able to remove an entry quickly. |
Member Functions
Name |
Description |
Checks internal consistency of the set. |
|
Removes all tracked entries. |
|
compress |
|
compressible |
|
Checks whether the given thread entry is tracked. |
|
Removes the given thread entry from the set. |
|
Returns the slot index of the given thread entry. |
|
Helper function for debugging checks. Fetch ptr for a given ThreadEnrtry. Used to sanity check the value in ElementDisposeInfo wrapper matches the ElementWrapper array used for fast access from the thread itself. |
|
|
Data Members
Name |
Description |
Index from thread entry to its slot in threadElements. |
|
The tracked elements in insertion order. |
Created with MrDocs