MCPcopy Create free account
hub / github.com/collin80/SavvyCAN / readerThread

Function readerThread

test/tst_lfqueue.cpp:33–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31
32
33void readerThread(LFQueue<int>* pQueue_p, int pSize, bool pSleep) {
34 int* val_p;
35
36 for(int i=0; i<pSize ; i++) {
37 while(! (val_p = pQueue_p->peek()) );
38 QVERIFY(val_p);
39
40 QCOMPARE(*val_p, i);
41 pQueue_p->dequeue();
42
43 if(pSleep)
44 QThread::msleep(1);
45 }
46}
47
48
49void TestLFQueue::exchange_data()

Callers

nothing calls this directly

Calls 2

peekMethod · 0.80
dequeueMethod · 0.80

Tested by

no test coverage detected