summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qfutureinterface.cpp
diff options
context:
space:
mode:
authorNick Shaforostoff <shafff@ukr.net>2014-06-16 18:50:12 +0300
committerNick Shaforostoff <shafff@ukr.net>2014-12-24 15:01:36 +0100
commit5b11e43e9f7551b9cb1ea7a6effdcab4bfa6b8c9 (patch)
tree8a51cb9b664e355ec9e89ad648f20344eaea10d9 /src/corelib/thread/qfutureinterface.cpp
parent6475462c6fdf28f40a35cb6926b2f1f58187eb8a (diff)
QThreadPool::cancel() to remove individual jobs from the job queue.
[ChangeLog][QtCore][QThreadPool] Added QThreadPool::cancel() which allows removing from the job queue a job that hasn't been started yet. Change-Id: Ib8f1c1f32a34f5eec8338c641d820b928e470164 Reviewed-by: Nick Shaforostoff <shafff@ukr.net> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/thread/qfutureinterface.cpp')
-rw-r--r--src/corelib/thread/qfutureinterface.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/thread/qfutureinterface.cpp b/src/corelib/thread/qfutureinterface.cpp
index 1f417d3d74..a23c32a73b 100644
--- a/src/corelib/thread/qfutureinterface.cpp
+++ b/src/corelib/thread/qfutureinterface.cpp
@@ -292,7 +292,7 @@ void QFutureInterfaceBase::waitForResult(int resultIndex)
// To avoid deadlocks and reduce the number of threads used, try to
// run the runnable in the current thread.
- d->pool()->d_func()->stealRunnable(d->runnable);
+ d->pool()->d_func()->stealAndRunRunnable(d->runnable);
lock.relock();
@@ -313,7 +313,7 @@ void QFutureInterfaceBase::waitForFinished()
lock.unlock();
if (!alreadyFinished) {
- d->pool()->d_func()->stealRunnable(d->runnable);
+ d->pool()->d_func()->stealAndRunRunnable(d->runnable);
lock.relock();