7#include <QtCore/qglobal.h>
9#include <QtCore/qthread.h>
10#include <QtCore/qrunnable.h>
23 Q_PROPERTY(
int expiryTimeout READ expiryTimeout WRITE setExpiryTimeout)
24 Q_PROPERTY(
int maxThreadCount READ maxThreadCount WRITE setMaxThreadCount)
25 Q_PROPERTY(
int activeThreadCount READ activeThreadCount)
39#if QT_CORE_REMOVED_SINCE(6, 6)
40 void start(std::function<
void()> functionToRun,
int priority = 0);
41 bool tryStart(std::function<
void()> functionToRun);
44 void startOnReservedThread(
QRunnable *runnable);
45#if QT_CORE_REMOVED_SINCE(6, 6)
46 void startOnReservedThread(std::function<
void()> functionToRun);
49 template <
typename Callable, QRunnable::if_callable<Callable> = true>
50 void start(Callable &&functionToRun,
int priority = 0);
51 template <
typename Callable, QRunnable::if_callable<Callable> = true>
52 bool tryStart(Callable &&functionToRun);
53 template <
typename Callable, QRunnable::if_callable<Callable> = true>
54 void startOnReservedThread(Callable &&functionToRun);
56 int expiryTimeout()
const;
57 void setExpiryTimeout(
int expiryTimeout);
59 int maxThreadCount()
const;
60 void setMaxThreadCount(
int maxThreadCount);
62 int activeThreadCount()
const;
64 void setStackSize(
uint stackSize);
65 uint stackSize()
const;
73 bool waitForDone(
int msecs = -1);
79 [[nodiscard]]
bool tryTake(
QRunnable *runnable);
82template <
typename Callable, QRunnable::if_callable<Callable>>
88template <
typename Callable, QRunnable::if_callable<Callable>>
98template <
typename Callable, QRunnable::if_callable<Callable>>
static QRunnable * create(Callable &&functionToRun)
void start(QRunnable *runnable, int priority=0)
Reserves a thread and uses it to run runnable, unless this thread will make the current thread count ...
void startOnReservedThread(QRunnable *runnable)
Releases a thread previously reserved with reserveThread() and uses it to run runnable.
bool tryStart(QRunnable *runnable)
Attempts to reserve a thread to run runnable.
Combined button and popup list for selecting options.
static bool contains(const QJsonArray &haystack, unsigned needle)
#define QT_REQUIRE_CONFIG(feature)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent