Base Framework
Public Attributes | Static Public Attributes | List of all members
ThreadLocalContext Class Reference

#include <base/concurrency/ThreadLocalContext.h>

Inherits DynamicObject.

Public Attributes

Threadthread = nullptr
 
unsigned int simpleId = 0
 
String name
 
struct {
   unsigned int   suspended = 0
 
   unsigned int   captureIO = 32
 
   unsigned int   tasks = 0
 
   Allocator< Profiler::Event >   events
 
profiling
 
FixedResourceManager< STORAGE_BUFFERS > storageManager
 
Allocator< uint8 > storage [STORAGE_BUFFERS]
 
StringOutputStream stringOutputStream
 
unsigned int stringOutputStreamUsage = 0
 
RandomInputStream randomInputStream
 
StackFrame stackTrace
 
unsigned int numberOfExceptions = 0
 
uint64 waiting = 0
 
uint64 bytesRead = 0
 
uint64 bytesWritten = 0
 

Static Public Attributes

static constexpr unsigned int STORAGE_BUFFERS = 4
 
static constexpr unsigned int PROFILER_TASKS = 64
 

Additional Inherited Members

- Public Member Functions inherited from DynamicObject
 DynamicObject () noexcept
 
bool isValidObject () const noexcept
 
virtual ~DynamicObject () noexcept(false)
 
 _COM_AZURE_DEV__BASE__OVERRIDE_ALLOC ()
 

Detailed Description

State for all threads. Do NOT access directly from external modules. Context may change at any time.

Member Data Documentation

◆ bytesRead

uint64 ThreadLocalContext::bytesRead = 0

Bytes read.

◆ bytesWritten

uint64 ThreadLocalContext::bytesWritten = 0

Bytes written.

◆ numberOfExceptions

unsigned int ThreadLocalContext::numberOfExceptions = 0

Number of exceptions thrown by thread.

◆ profiling

struct { ... } ThreadLocalContext::profiling

Profiling context.

◆ randomInputStream

RandomInputStream ThreadLocalContext::randomInputStream

Random generator.

◆ simpleId

unsigned int ThreadLocalContext::simpleId = 0

Simple unique id - does NOT relate to system IDs.

◆ stackTrace

StackFrame ThreadLocalContext::stackTrace

Last known stack trace for exception.

◆ storage

Allocator<uint8> ThreadLocalContext::storage[STORAGE_BUFFERS]

The thread local storage.

◆ storageManager

FixedResourceManager<STORAGE_BUFFERS> ThreadLocalContext::storageManager

Counter for storage usage.

◆ stringOutputStream

StringOutputStream ThreadLocalContext::stringOutputStream

String output stream.

◆ stringOutputStreamUsage

unsigned int ThreadLocalContext::stringOutputStreamUsage = 0

String output stream.

◆ thread

Thread* ThreadLocalContext::thread = nullptr

The thread object associated with context.

◆ waiting

uint64 ThreadLocalContext::waiting = 0

Total microseconds spend waiting.