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

Method thread

tests/relacy/integrated.cpp:148–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146 }
147
148 void thread(unsigned int tid)
149 {
150 RelacyThreadExitNotifier::notify_relacy_thread_start();
151
152 if (tid <= 1) {
153 int item;
154 ConsumerToken t(q);
155 for (int i = 0; i != 5; ++i) {
156 q.try_dequeue(t, item);
157 }
158 }
159 else {
160 ProducerToken t(q);
161 for (int i = 0; i != 3; ++i) {
162 q.enqueue(t, tid * 10 + i);
163 }
164 }
165
166 RelacyThreadExitNotifier::notify_relacy_thread_exit();
167 }
168
169 void after()
170 {

Callers

nothing calls this directly

Calls 2

try_dequeueMethod · 0.45
enqueueMethod · 0.45

Tested by

no test coverage detected