proxygen
folly::threadlocal_detail::ThreadEntry Struct Reference

#include <ThreadLocalDetail.h>

Public Member Functions

size_t getElementsCapacity () const noexcept
 
void setElementsCapacity (size_t capacity) noexcept
 

Public Attributes

ElementWrapperelements {nullptr}
 
std::atomic< size_t > elementsCapacity {0}
 
ThreadEntrynext {nullptr}
 
ThreadEntryprev {nullptr}
 
ThreadEntryListlist {nullptr}
 
ThreadEntrylistNext {nullptr}
 
StaticMetaBasemeta {nullptr}
 
bool removed_ {false}
 

Detailed Description

Per-thread entry. Each thread using a StaticMeta object has one. This is written from the owning thread only (under the lock), read from the owning thread (no lock necessary), and read from other threads (under the lock). StaticMetaBase::head_ elementsCapacity can be read from any thread on reallocate (no lock)

Definition at line 209 of file ThreadLocalDetail.h.

Member Function Documentation

void folly::threadlocal_detail::ThreadEntry::setElementsCapacity ( size_t  capacity)
inlinenoexcept

Definition at line 223 of file ThreadLocalDetail.h.

Referenced by folly::threadlocal_detail::StaticMetaBase::reserve(), and folly::threadlocal_detail::StaticMetaBase::reserveHeadUnlocked().

223  {
224  elementsCapacity.store(capacity, std::memory_order_relaxed);
225  }

Member Data Documentation

std::atomic<size_t> folly::threadlocal_detail::ThreadEntry::elementsCapacity {0}

Definition at line 211 of file ThreadLocalDetail.h.

ThreadEntryList* folly::threadlocal_detail::ThreadEntry::list {nullptr}
ThreadEntry* folly::threadlocal_detail::ThreadEntry::listNext {nullptr}
bool folly::threadlocal_detail::ThreadEntry::removed_ {false}

The documentation for this struct was generated from the following file: