summaryrefslogtreecommitdiffstats
path: root/examples/qtconcurrent/runfunction/main.cpp
diff options
context:
space:
mode:
authorDennis Oberst <dennis.oberst@qt.io>2023-03-01 13:58:51 +0100
committerDennis Oberst <dennis.oberst@qt.io>2023-03-09 17:26:59 +0000
commitde5e0422ca14ad1bc042889fa68772bf6912a215 (patch)
tree8b4854a193d5bd8df9e8cf91a0a20dd8f7c3f7ba /examples/qtconcurrent/runfunction/main.cpp
parentfbb470b40b2c86a55751bf3099cc0424f66c7274 (diff)
Example: remove runfunction example
This example shows how to use QtConcurrent::run by calling a global function and printing the thread ID. As the documentation already explains the functionality very well, I don't think this example is necessary. https://doc.qt.io/qt-6/qtconcurrentrun.html Task-number: QTBUG-111165 Pick-to: 6.5 6.5.0 Change-Id: I42a718cdaabdaeeab39b933d12c67d11978c95da Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Diffstat (limited to 'examples/qtconcurrent/runfunction/main.cpp')
-rw-r--r--examples/qtconcurrent/runfunction/main.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/examples/qtconcurrent/runfunction/main.cpp b/examples/qtconcurrent/runfunction/main.cpp
deleted file mode 100644
index 4c00e11f1d2..00000000000
--- a/examples/qtconcurrent/runfunction/main.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-
-#include <QDebug>
-#include <QThread>
-#include <QString>
-#include <qtconcurrentrun.h>
-#include <QApplication>
-
-using namespace QtConcurrent;
-
-void hello(QString name)
-{
- qDebug() << "Hello" << name << "from" << QThread::currentThread();
-}
-
-int main(int argc, char **argv)
-{
- QApplication app(argc, argv);
- QFuture<void> f1 = run(hello, QString("Alice"));
- QFuture<void> f2 = run(hello, QString("Bob"));
- f1.waitForFinished();
- f2.waitForFinished();
-}