diff options
author | Robin Burchell <robin+qt@viroteck.net> | 2012-03-05 22:11:05 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-06 06:34:38 +0100 |
commit | eb150a51cd1e439fd719fe3cd3f30c53f9a1348a (patch) | |
tree | 4ccc832d65217e9da3f32f93a48eec241e1465de /src/corelib/thread | |
parent | ea6d1fde1b5ce53691cc9b9154bd992a16be035f (diff) |
Remove unused QThreadPoolPrivate::startFrontRunnable().
Change-Id: Ie079aea3412a53cf9dccaa770fa64ff5b6b7b3b1
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'src/corelib/thread')
-rw-r--r-- | src/corelib/thread/qthreadpool.cpp | 25 | ||||
-rw-r--r-- | src/corelib/thread/qthreadpool_p.h | 1 |
2 files changed, 0 insertions, 26 deletions
diff --git a/src/corelib/thread/qthreadpool.cpp b/src/corelib/thread/qthreadpool.cpp index af8c99197e..b7021817c5 100644 --- a/src/corelib/thread/qthreadpool.cpp +++ b/src/corelib/thread/qthreadpool.cpp @@ -308,31 +308,6 @@ bool QThreadPoolPrivate::waitForDone(int msecs) } /*! \internal - Pulls a runnable from the front queue and runs it in the current thread. Blocks - until the runnable has completed. Returns true if a runnable was found. -*/ -bool QThreadPoolPrivate::startFrontRunnable() -{ - QMutexLocker locker(&mutex); - if (queue.isEmpty()) - return false; - - QRunnable *runnable = queue.takeFirst().first; - const bool autoDelete = runnable->autoDelete(); - bool del = autoDelete && !--runnable->ref; - - locker.unlock(); - runnable->run(); - locker.relock(); - - if (del) { - delete runnable; - } - - return true; -} - -/*! \internal Seaches for \a runnable in the queue, removes it from the queue and runs it if found. This functon does not return until the runnable has completed. diff --git a/src/corelib/thread/qthreadpool_p.h b/src/corelib/thread/qthreadpool_p.h index 9a7c09695f..910e0b0714 100644 --- a/src/corelib/thread/qthreadpool_p.h +++ b/src/corelib/thread/qthreadpool_p.h @@ -83,7 +83,6 @@ public: void startThread(QRunnable *runnable = 0); void reset(); bool waitForDone(int msecs = -1); - bool startFrontRunnable(); void stealRunnable(QRunnable *); mutable QMutex mutex; |