mirror of
https://github.com/simonbrunel/qtpromise.git
synced 2025-07-03 07:45:26 +08:00
Add multithreading support
Make QPromise thread safe but also ensure that continuation lambdas (then/fail/finally) are called in the thread of the promise instance they are attached to.
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
QT += concurrent
|
||||
TARGET = tst_benchmark
|
||||
SOURCES += $$PWD/tst_benchmark.cpp
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
#include <QtPromise>
|
||||
|
||||
// Qt
|
||||
#include <QtConcurrent>
|
||||
#include <QtTest>
|
||||
|
||||
using namespace QtPromise;
|
||||
@ -11,11 +10,11 @@ class tst_benchmark: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
private Q_SLOTS:
|
||||
void valueResolve();
|
||||
void valueReject();
|
||||
void valueThen();
|
||||
void errorReject();
|
||||
private Q_SLOTS:
|
||||
void errorThen();
|
||||
|
||||
}; // class tst_benchmark
|
||||
|
Reference in New Issue
Block a user