Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
src_corelib_thread_qfuturesynchronizer.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
6{
7 QFutureSynchronizer<void> synchronizer;
8
9 ...
10
11 synchronizer.addFuture(QtConcurrent::run(anotherFunction));
12 synchronizer.addFuture(QtConcurrent::map(list, mapFunction));
13
14 return; // QFutureSynchronizer waits for all futures to finish
15}
QTCONCURRENT_RUN_NODISCARD auto run(QThreadPool *pool, Function &&f, Args &&...args)
QFuture< void > map(QThreadPool *pool, Sequence &&sequence, MapFunctor &&map)
Calls function once for each item in sequence.
QList< int > list
[14]