summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthreadpool.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-02-25 16:16:42 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-02-26 06:25:20 +0100
commit23c5fc1d2fa9d9ff51129280288d13c935105b10 (patch)
tree176188935ec3473af15b0a38883cd475a01b9de4 /src/corelib/thread/qthreadpool.h
parent165d2f09cd9a7f8a17da430846cbeb9dc51f55be (diff)
Improve argument name for std::function argument
Less \a fun though. Note using references in this API would just duplicate the API, but still end up with a copy when creating the QRunnable. By having the copy apparent directly in the API, we not only save the duplication, we also hint to the caller to use move if they want to avoid a copy. Change-Id: If11476d4b38853839c1e87e0339807a1798fc875 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/thread/qthreadpool.h')
-rw-r--r--src/corelib/thread/qthreadpool.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/thread/qthreadpool.h b/src/corelib/thread/qthreadpool.h
index 2eede44eca..e3691ab010 100644
--- a/src/corelib/thread/qthreadpool.h
+++ b/src/corelib/thread/qthreadpool.h
@@ -72,8 +72,8 @@ 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);
+ void start(std::function<void()> functionToRun, int priority = 0);
+ bool tryStart(std::function<void()> functionToRun);
int expiryTimeout() const;
void setExpiryTimeout(int expiryTimeout);