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

Method thread

tests/relacy/integrated.cpp:329–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

327 }
328
329 void thread(unsigned int tid)
330 {
331 RelacyThreadExitNotifier::notify_relacy_thread_start();
332
333 if (tid == 0) {
334 for (int i = 0; i != 5; ++i) {
335 q.enqueue(i);
336 }
337 }
338 else {
339 int item;
340 for (int i = 0; i != 3; ++i) {
341 if (q.try_dequeue(item)) {
342 RL_ASSERT(!seen[item]);
343 seen[item] = true;
344 }
345 }
346 }
347
348 RelacyThreadExitNotifier::notify_relacy_thread_exit();
349 }
350
351 void after()
352 {

Callers

nothing calls this directly

Calls 2

enqueueMethod · 0.45
try_dequeueMethod · 0.45

Tested by

no test coverage detected