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

Method thread

tests/relacy/integrated.cpp:380–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

378 }
379
380 void thread(unsigned int tid)
381 {
382 RelacyThreadExitNotifier::notify_relacy_thread_start();
383
384 q.enqueue(tid * 3 + 0);
385 q.enqueue(tid * 3 + 1);
386 q.enqueue(tid * 3 + 2);
387
388 int item;
389 for (int i = 0; i != 2; ++i) {
390 if (q.try_dequeue(item)) {
391 RL_ASSERT(!seen[item]);
392 seen[item] = true;
393 }
394 }
395
396 RelacyThreadExitNotifier::notify_relacy_thread_exit();
397 }
398
399 void after()
400 {

Callers

nothing calls this directly

Calls 2

enqueueMethod · 0.45
try_dequeueMethod · 0.45

Tested by

no test coverage detected