summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthreadpool.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/thread/qthreadpool.h')
-rw-r--r--src/corelib/thread/qthreadpool.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/thread/qthreadpool.h b/src/corelib/thread/qthreadpool.h
index cd27b7c08a..2eede44eca 100644
--- a/src/corelib/thread/qthreadpool.h
+++ b/src/corelib/thread/qthreadpool.h
@@ -45,6 +45,8 @@
#include <QtCore/qthread.h>
#include <QtCore/qrunnable.h>
+#include <functional>
+
QT_REQUIRE_CONFIG(thread);
QT_BEGIN_NAMESPACE
@@ -70,6 +72,9 @@ public:
void start(QRunnable *runnable, int priority = 0);
bool tryStart(QRunnable *runnable);
+ void start(std::function<void()> fun, int priority = 0);
+ bool tryStart(std::function<void()> fun);
+
int expiryTimeout() const;
void setExpiryTimeout(int expiryTimeout);