qtconcurrentthreadengine.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/concurrent/qtconcurrentthreadengine.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6namespace QtConcurrent {-
7-
8ThreadEngineBarrier::ThreadEngineBarrier()-
9:count(0) { }
executed 81088 times by 5 tests: end of block
Executed by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
81088
10-
11void ThreadEngineBarrier::acquire()-
12{-
13 for(;;) {-
14 int localCount = count.load();-
15 if (localCount < 0
localCount < 0Description
TRUEevaluated 42 times by 2 tests
Evaluated by:
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentthreadengine - unknown status
FALSEevaluated 161488 times by 5 tests
Evaluated by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
) {
42-161488
16 if (count.testAndSetOrdered(localCount, localCount -1)
count.testAndS...localCount -1)Description
TRUEevaluated 42 times by 2 tests
Evaluated by:
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentthreadengine - unknown status
FALSEnever evaluated
)
0-42
17 return;
executed 42 times by 2 tests: return;
Executed by:
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentthreadengine - unknown status
42
18 }
never executed: end of block
else {
0
19 if (count.testAndSetOrdered(localCount, localCount + 1)
count.testAndS...ocalCount + 1)Description
TRUEevaluated 161488 times by 5 tests
Evaluated by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
FALSEnever evaluated
)
0-161488
20 return;
executed 161488 times by 5 tests: return;
Executed by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
161488
21 }
never executed: end of block
0
22 }-
23}
never executed: end of block
0
24-
25int ThreadEngineBarrier::release()-
26{-
27 for(;;) {-
28 int localCount = count.load();-
29 if (localCount == -1
localCount == -1Description
TRUEevaluated 73 times by 4 tests
Evaluated by:
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
FALSEevaluated 161446 times by 5 tests
Evaluated by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
) {
73-161446
30 if (count.testAndSetOrdered(-1, 0)
count.testAndSetOrdered(-1, 0)Description
TRUEevaluated 73 times by 4 tests
Evaluated by:
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
FALSEnever evaluated
) {
0-73
31 semaphore.release();-
32 return
executed 73 times by 4 tests: return 0;
Executed by:
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
0;
executed 73 times by 4 tests: return 0;
Executed by:
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
73
33 }-
34 }
never executed: end of block
else if (localCount < 0
localCount < 0Description
TRUEevaluated 42 times by 2 tests
Evaluated by:
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentthreadengine - unknown status
FALSEevaluated 161404 times by 5 tests
Evaluated by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
) {
0-161404
35 if (count.testAndSetOrdered(localCount, localCount + 1)
count.testAndS...ocalCount + 1)Description
TRUEevaluated 42 times by 2 tests
Evaluated by:
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentthreadengine - unknown status
FALSEnever evaluated
)
0-42
36 return
executed 42 times by 2 tests: return qAbs(localCount + 1);
Executed by:
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentthreadengine - unknown status
qAbs(localCount + 1);
executed 42 times by 2 tests: return qAbs(localCount + 1);
Executed by:
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentthreadengine - unknown status
42
37 }
never executed: end of block
else {
0
38 if (count.testAndSetOrdered(localCount, localCount - 1)
count.testAndS...ocalCount - 1)Description
TRUEevaluated 161404 times by 5 tests
Evaluated by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
FALSEnever evaluated
)
0-161404
39 return
executed 161404 times by 5 tests: return localCount - 1;
Executed by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
localCount - 1;
executed 161404 times by 5 tests: return localCount - 1;
Executed by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
161404
40 }
never executed: end of block
0
41 }-
42}
never executed: end of block
0
43-
44-
45void ThreadEngineBarrier::wait()-
46{-
47 for(;;) {-
48 int localCount = count.load();-
49 if (localCount == 0
localCount == 0Description
TRUEevaluated 20496 times by 4 tests
Evaluated by:
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
FALSEevaluated 73 times by 4 tests
Evaluated by:
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
)
73-20496
50 return;
executed 20496 times by 4 tests: return;
Executed by:
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
20496
51-
52 ((!(localCount > 0)) ? qt_assert("localCount > 0",__FILE__,92) : qt_noop());-
53 if (count.testAndSetOrdered(localCount, -localCount)
count.testAndS..., -localCount)Description
TRUEevaluated 73 times by 4 tests
Evaluated by:
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
FALSEnever evaluated
) {
0-73
54 semaphore.acquire();-
55 return;
executed 73 times by 4 tests: return;
Executed by:
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
73
56 }-
57 }
never executed: end of block
0
58}
never executed: end of block
0
59-
60int ThreadEngineBarrier::currentCount()-
61{-
62 return
never executed: return count.load();
count.load();
never executed: return count.load();
0
63}-
64-
65-
66-
67bool ThreadEngineBarrier::releaseUnlessLast()-
68{-
69 for(;;) {-
70 int localCount = count.load();-
71 if (qAbs(localCount) == 1
qAbs(localCount) == 1Description
TRUEevaluated 2084 times by 2 tests
Evaluated by:
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentthreadengine - unknown status
FALSEevaluated 11 times by 2 tests
Evaluated by:
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentthreadengine - unknown status
) {
11-2084
72 return
executed 2084 times by 2 tests: return false;
Executed by:
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentthreadengine - unknown status
false;
executed 2084 times by 2 tests: return false;
Executed by:
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentthreadengine - unknown status
2084
73 } else if (localCount < 0
localCount < 0Description
TRUEnever evaluated
FALSEevaluated 11 times by 2 tests
Evaluated by:
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentthreadengine - unknown status
) {
0-11
74 if (count.testAndSetOrdered(localCount, localCount + 1)
count.testAndS...ocalCount + 1)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
75 return
never executed: return true;
true;
never executed: return true;
0
76 }
never executed: end of block
else {
0
77 if (count.testAndSetOrdered(localCount, localCount - 1)
count.testAndS...ocalCount - 1)Description
TRUEevaluated 11 times by 2 tests
Evaluated by:
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentthreadengine - unknown status
FALSEnever evaluated
)
0-11
78 return
executed 11 times by 2 tests: return true;
Executed by:
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentthreadengine - unknown status
true;
executed 11 times by 2 tests: return true;
Executed by:
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentthreadengine - unknown status
11
79 }
never executed: end of block
0
80 }-
81}
never executed: end of block
0
82-
83ThreadEngineBase::ThreadEngineBase()-
84:futureInterface(0), threadPool(QThreadPool::globalInstance())-
85{-
86 setAutoDelete(false);-
87}
executed 81088 times by 5 tests: end of block
Executed by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
81088
88-
89ThreadEngineBase::~ThreadEngineBase() {}-
90-
91void ThreadEngineBase::startSingleThreaded()-
92{-
93 start();-
94 while (threadFunction() != ThreadFinished
threadFunction...ThreadFinishedDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qtconcurrentthreadengine - unknown status
)
0-1
95 ;
never executed: ;
0
96 finish();-
97}
executed 1 time by 1 test: end of block
Executed by:
  • tst_qtconcurrentthreadengine - unknown status
1
98-
99void ThreadEngineBase::startBlocking()-
100{-
101 start();-
102 barrier.acquire();-
103 startThreads();-
104-
105 bool throttled = false;-
106-
107 try {-
108-
109 while (threadFunction() == ThrottleThread
threadFunction...ThrottleThreadDescription
TRUEevaluated 11 times by 2 tests
Evaluated by:
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentthreadengine - unknown status
FALSEevaluated 20554 times by 4 tests
Evaluated by:
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
) {
11-20554
110 if (threadThrottleExit()
threadThrottleExit()Description
TRUEevaluated 11 times by 2 tests
Evaluated by:
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentthreadengine - unknown status
FALSEnever evaluated
) {
0-11
111 throttled = true;-
112 break;
executed 11 times by 2 tests: break;
Executed by:
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentthreadengine - unknown status
11
113 }-
114 }
never executed: end of block
0
115-
116 }
executed 20565 times by 4 tests: end of block
Executed by:
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
catch (QException &e) {
20565
117 handleException(e);-
118 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qtconcurrentthreadengine - unknown status
catch (...) {
2
119 handleException(QUnhandledException());-
120 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qtconcurrentthreadengine - unknown status
2
121-
122-
123 if (throttled == false
throttled == falseDescription
TRUEevaluated 20558 times by 4 tests
Evaluated by:
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
FALSEevaluated 11 times by 2 tests
Evaluated by:
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentthreadengine - unknown status
) {
11-20558
124 barrier.release();-
125 }
executed 20558 times by 4 tests: end of block
Executed by:
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
20558
126-
127 barrier.wait();-
128 finish();-
129 exceptionStore.throwPossibleException();-
130}
executed 20565 times by 4 tests: end of block
Executed by:
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
20565
131-
132void ThreadEngineBase::startThread()-
133{-
134 startThreadInternal();-
135}
executed 19222 times by 4 tests: end of block
Executed by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
19222
136-
137void ThreadEngineBase::acquireBarrierSemaphore()-
138{-
139 barrier.acquire();-
140}
executed 60519 times by 5 tests: end of block
Executed by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
60519
141-
142bool ThreadEngineBase::isCanceled()-
143{-
144 if (futureInterface
futureInterfaceDescription
TRUEevaluated 133141 times by 5 tests
Evaluated by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
FALSEevaluated 48099 times by 4 tests
Evaluated by:
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
)
48099-133141
145 return
executed 133141 times by 5 tests: return futureInterface->isCanceled();
Executed by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
futureInterface->isCanceled();
executed 133141 times by 5 tests: return futureInterface->isCanceled();
Executed by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
133141
146 else-
147 return
executed 48099 times by 4 tests: return false;
Executed by:
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
false;
executed 48099 times by 4 tests: return false;
Executed by:
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
48099
148}-
149-
150void ThreadEngineBase::waitForResume()-
151{-
152 if (futureInterface
futureInterfaceDescription
TRUEevaluated 6309 times by 4 tests
Evaluated by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
FALSEevaluated 13666 times by 3 tests
Evaluated by:
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
)
6309-13666
153 futureInterface->waitForResume();
executed 6309 times by 4 tests: futureInterface->waitForResume();
Executed by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
6309
154}
executed 19975 times by 4 tests: end of block
Executed by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
19975
155-
156bool ThreadEngineBase::isProgressReportingEnabled()-
157{-
158-
159 return
executed 20914 times by 4 tests: return (futureInterface != 0);
Executed by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
(futureInterface != 0);
executed 20914 times by 4 tests: return (futureInterface != 0);
Executed by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
20914
160}-
161-
162void ThreadEngineBase::setProgressValue(int progress)-
163{-
164 if (futureInterface
futureInterfaceDescription
TRUEevaluated 5904 times by 4 tests
Evaluated by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
FALSEnever evaluated
)
0-5904
165 futureInterface->setProgressValue(progress);
executed 5904 times by 4 tests: futureInterface->setProgressValue(progress);
Executed by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
5904
166}
executed 5904 times by 4 tests: end of block
Executed by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
5904
167-
168void ThreadEngineBase::setProgressRange(int minimum, int maximum)-
169{-
170 if (futureInterface
futureInterfaceDescription
TRUEevaluated 259 times by 4 tests
Evaluated by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
FALSEnever evaluated
)
0-259
171 futureInterface->setProgressRange(minimum, maximum);
executed 259 times by 4 tests: futureInterface->setProgressRange(minimum, maximum);
Executed by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
259
172}
executed 259 times by 4 tests: end of block
Executed by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
259
173-
174bool ThreadEngineBase::startThreadInternal()-
175{-
176 if (this->isCanceled()
this->isCanceled()Description
TRUEnever evaluated
FALSEevaluated 80442 times by 5 tests
Evaluated by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
)
0-80442
177 return
never executed: return false;
false;
never executed: return false;
0
178-
179 barrier.acquire();-
180 if (!threadPool->tryStart(this)
!threadPool->tryStart(this)Description
TRUEevaluated 80205 times by 5 tests
Evaluated by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
FALSEevaluated 237 times by 4 tests
Evaluated by:
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
) {
237-80205
181 barrier.release();-
182 return
executed 80205 times by 5 tests: return false;
Executed by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
false;
executed 80205 times by 5 tests: return false;
Executed by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
80205
183 }-
184 return
executed 237 times by 4 tests: return true;
Executed by:
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
true;
executed 237 times by 4 tests: return true;
Executed by:
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
237
185}-
186-
187void ThreadEngineBase::startThreads()-
188{-
189 while (shouldStartThread()
shouldStartThread()Description
TRUEevaluated 61220 times by 5 tests
Evaluated by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
FALSEevaluated 20239 times by 4 tests
Evaluated by:
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
&& startThreadInternal()
startThreadInternal()Description
TRUEevaluated 236 times by 4 tests
Evaluated by:
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
FALSEevaluated 60984 times by 5 tests
Evaluated by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
)
236-61220
190 ;
executed 236 times by 4 tests: ;
Executed by:
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
236
191}
executed 81223 times by 5 tests: end of block
Executed by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
81223
192-
193void ThreadEngineBase::threadExit()-
194{-
195 const bool asynchronous = futureInterface != 0;-
196 const int lastThread = (barrier.release() == 0);-
197-
198 if (lastThread
lastThreadDescription
TRUEevaluated 60592 times by 5 tests
Evaluated by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
FALSEevaluated 164 times by 3 tests
Evaluated by:
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
&& asynchronous
asynchronousDescription
TRUEevaluated 60519 times by 5 tests
Evaluated by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
FALSEevaluated 73 times by 4 tests
Evaluated by:
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
)
73-60592
199 this->asynchronousFinish();
executed 60519 times by 5 tests: this->asynchronousFinish();
Executed by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
60519
200}
executed 60756 times by 5 tests: end of block
Executed by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
60756
201-
202-
203-
204-
205bool ThreadEngineBase::threadThrottleExit()-
206{-
207 return
executed 2095 times by 2 tests: return barrier.releaseUnlessLast();
Executed by:
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentthreadengine - unknown status
barrier.releaseUnlessLast();
executed 2095 times by 2 tests: return barrier.releaseUnlessLast();
Executed by:
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentthreadengine - unknown status
2095
208}-
209-
210void ThreadEngineBase::run()-
211{-
212 if (this->isCanceled()
this->isCanceled()Description
TRUEevaluated 102 times by 3 tests
Evaluated by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentthreadengine - unknown status
FALSEevaluated 60654 times by 5 tests
Evaluated by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
) {
102-60654
213 threadExit();-
214 return;
executed 102 times by 3 tests: return;
Executed by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentthreadengine - unknown status
102
215 }-
216-
217 startThreads();-
218-
219-
220 try {-
221-
222 while (threadFunction() == ThrottleThread
threadFunction...ThrottleThreadDescription
TRUEevaluated 2084 times by 2 tests
Evaluated by:
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentthreadengine - unknown status
FALSEevaluated 60647 times by 5 tests
Evaluated by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
) {
2084-60647
223-
224-
225-
226-
227 if (threadThrottleExit()
threadThrottleExit()Description
TRUEnever evaluated
FALSEevaluated 2084 times by 2 tests
Evaluated by:
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentthreadengine - unknown status
)
0-2084
228 return;
never executed: return;
0
229 }
executed 2084 times by 2 tests: end of block
Executed by:
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentthreadengine - unknown status
2084
230-
231-
232 }
executed 60647 times by 5 tests: end of block
Executed by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
catch (QException &e) {
60647
233 handleException(e);-
234 }
executed 4 times by 2 tests: end of block
Executed by:
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
catch (...) {
4
235 handleException(QUnhandledException());-
236 }
executed 3 times by 1 test: end of block
Executed by:
  • tst_qtconcurrentthreadengine - unknown status
3
237-
238 threadExit();-
239}
executed 60654 times by 5 tests: end of block
Executed by:
  • tst_qfuturewatcher - unknown status
  • tst_qtconcurrentfilter - unknown status
  • tst_qtconcurrentiteratekernel - unknown status
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
60654
240-
241-
242-
243void ThreadEngineBase::handleException(const QException &exception)-
244{-
245 if (futureInterface
futureInterfaceDescription
TRUEevaluated 3 times by 2 tests
Evaluated by:
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qtconcurrentthreadengine - unknown status
)
3-8
246 futureInterface->reportException(exception);
executed 3 times by 2 tests: futureInterface->reportException(exception);
Executed by:
  • tst_qtconcurrentmap - unknown status
  • tst_qtconcurrentthreadengine - unknown status
3
247 else-
248 exceptionStore.setException(exception);
executed 8 times by 1 test: exceptionStore.setException(exception);
Executed by:
  • tst_qtconcurrentthreadengine - unknown status
8
249}-
250-
251-
252-
253}-
254-
255-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9