MCPcopy Create free account
hub / github.com/apache/trafficserver / Thread

Class Thread

include/iocore/eventsystem/Thread.h:89–171  ·  view source on GitHub ↗

Base class for the threads in the Event System. Thread is the base class for all the thread classes in the Event System. Objects of the Thread class represent spawned or running threads and provide minimal information for its derived classes. Thread objects have a reference to a ProxyMutex, that is used for atomic operations internally, and an ink_thread member that is used to identify t

Source from the content-addressed store, hash-verified

87
88*/
89class Thread
90{
91public:
92 /**
93 System-wide thread identifier. The thread identifier is represented
94 by the platform independent type ink_thread and it is the system-wide
95 value assigned to each thread. It is exposed as a convenience for
96 processors and you should not modify it directly.
97
98 */
99 // NOLINTNEXTLINE(modernize-use-nullptr)
100 ink_thread tid = 0;
101
102 /**
103 Thread lock to ensure atomic operations. The thread lock available
104 to derived classes to ensure atomic operations and protect critical
105 regions. Do not modify this member directly.
106
107 */
108 Ptr<ProxyMutex> mutex;
109
110 virtual void set_specific() = 0;
111
112 static thread_local Thread *this_thread_ptr;
113
114 // For THREAD_ALLOC
115 ProxyAllocator eventAllocator;
116 ProxyAllocator netVCAllocator;
117 ProxyAllocator sslNetVCAllocator;
118 ProxyAllocator quicNetVCAllocator;
119 ProxyAllocator http1ClientSessionAllocator;
120 ProxyAllocator http2ClientSessionAllocator;
121 ProxyAllocator http2ServerSessionAllocator;
122 ProxyAllocator http2StreamAllocator;
123 ProxyAllocator httpSMAllocator;
124 ProxyAllocator quicClientSessionAllocator;
125 ProxyAllocator httpServerSessionAllocator;
126 ProxyAllocator hdrHeapAllocator;
127 ProxyAllocator strHeapAllocator;
128 ProxyAllocator cacheVConnectionAllocator;
129 ProxyAllocator cacheEvacuateDocVConnectionAllocator;
130 ProxyAllocator openDirEntryAllocator;
131 ProxyAllocator ramCacheCLFUSEntryAllocator;
132 ProxyAllocator ramCacheLRUEntryAllocator;
133 ProxyAllocator evacuationBlockAllocator;
134 ProxyAllocator ioDataAllocator;
135 ProxyAllocator ioAllocator;
136 ProxyAllocator ioBlockAllocator;
137 ProxyAllocator preWarmSMAllocator;
138 // From InkAPI (plugins wrappers)
139 ProxyAllocator apiHookAllocator;
140 ProxyAllocator INKContAllocator;
141 ProxyAllocator INKVConnAllocator;
142 ProxyAllocator mHandleAllocator;
143#if TS_HAS_CRIPTS == 1
144 ProxyAllocator criptContextAllocator;
145#endif
146

Callers 1

mainFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected