84 void multipleResults();
127 void tst_QtConcurrentIterateKernel::instantiate()
134 void tst_QtConcurrentIterateKernel::cancel()
163 void tst_QtConcurrentIterateKernel::stresstest()
166 const int times = 50;
167 for (
int i = 0;
i < times; ++
i) {
171 auto future =
f->startAsynchronously();
177 void tst_QtConcurrentIterateKernel::noIterations()
179 const int times = 20000;
180 for (
int i = 0;
i < times; ++
i) {
183 .startAsynchronously();
233 void tst_QtConcurrentIterateKernel::throttling()
235 const int totalIterations = 400;
242 auto future =
f->startAsynchronously();
263 void tst_QtConcurrentIterateKernel::multipleResults()
275 #include "tst_qtconcurrentiteratekernel.moc"
small capitals from c petite p scientific i
[1]
bool runIterations(TestIterator, int begin, int end, void *) override
bool runIteration(TestIterator it, int index, void *result) override
CountFor(TestIterator begin, TestIterator end)
MultipleResultsFor(TestIterator begin, TestIterator end)
bool runIterations(TestIterator, int begin, int end, int *results) override
bool runIteration(TestIterator it, int index, void *result) override
PrintFor(TestIterator begin, TestIterator end)
bool runIterations(TestIterator, int begin, int end, void *) override
The QAtomicInt class provides platform-independent atomic operations on int.
void storeRelaxed(T newValue) noexcept
T fetchAndAddRelaxed(T valueToAdd) noexcept
T loadRelaxed() const noexcept
static QByteArray number(int, int base=10)
The QMutex class provides access serialization between threads.
The QMutexLocker class is a convenience class that simplifies locking and unlocking mutexes.
static int idealThreadCount() noexcept
static QThread * currentThread()
The QThreadPool class manages a collection of QThreads.
static QThreadPool * globalInstance()
bool runIteration(TestIterator it, int index, void *result) override
SleepPrintFor(TestIterator begin, TestIterator end)
bool runIterations(TestIterator, int begin, int end, void *) override
bool runIteration(TestIterator it, int index, void *result) override
bool shouldThrottleThread() override
ThrottleFor(TestIterator begin, TestIterator end)
bool runIterations(TestIterator, int begin, int end, void *) override
Q_CORE_EXPORT void qSleep(int ms)
Q_CORE_EXPORT void qWait(int ms)
The QtConcurrent namespace provides high-level APIs that make it possible to write multi-threaded pro...
ThreadEngineStarter< typename ThreadEngine::ResultType > startThreadEngine(ThreadEngine *threadEngine)
[qtconcurrentthreadengine-1]
int distance(TestIterator &a, TestIterator &b)
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
[7]
QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator begin(const QRegularExpressionMatchIterator &iterator)
#define QTEST_MAIN(TestObject)
#define QVERIFY(statement)
#define QVERIFY2(statement, description)
QFuture< void > future
[5]
int operator-(const TestIterator &other)
TestIterator & operator++()
bool operator!=(const TestIterator &other) const
random_access_iterator_tag iterator_category
QSet< QThread * > threads