MCPcopy Create free account
hub / github.com/cameron314/concurrentqueue / thread

Method thread

tests/relacy/freelist.cpp:162–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160 }
161
162 void thread(unsigned int tid)
163 {
164 TestNode* node;
165 int myNodeCount = tid >= 4 ? 2 : 1;
166 for (int i = 0; i != myNodeCount; ++i) {
167 node = &initialNodes[tid + (tid >= 5 ? 1 : 0) + i];
168 node->value = tid;
169 freeList.add(node);
170 }
171
172 for (int i = 0; i != 3; ++i) {
173 node = freeList.try_get();
174 if (node != nullptr) {
175 freeList.add(node);
176 }
177 }
178 }
179
180 void after()
181 {

Callers

nothing calls this directly

Calls 2

addMethod · 0.45
try_getMethod · 0.45

Tested by

no test coverage detected