diff options
author | David Faure <david.faure@kdab.com> | 2013-06-21 12:21:02 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-15 11:42:27 (GMT) |
commit | 735f4851843892a9562dbd59b319d436dc04055b (patch) | |
tree | 6f028722e7300ec8e6e16b817a537013d0365c2e | |
parent | 8ebaa4ce5a683837c2121351c0114d2b10574f48 (diff) | |
download | Qt-735f4851843892a9562dbd59b319d436dc04055b.zip Qt-735f4851843892a9562dbd59b319d436dc04055b.tar.gz Qt-735f4851843892a9562dbd59b319d436dc04055b.tar.bz2 |
QThreadPool: fix typos
Task-number: QTBUG-31919
Backport from qtbase/37dc44d499884bd0d7ab9d2f1547db468c9fe53b
Change-Id: I9496b059ed201da6b7a5ec02c4acb8f231e40c30
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | src/corelib/concurrent/qthreadpool.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/corelib/concurrent/qthreadpool.cpp b/src/corelib/concurrent/qthreadpool.cpp index e8acd7f..c3d0292 100644 --- a/src/corelib/concurrent/qthreadpool.cpp +++ b/src/corelib/concurrent/qthreadpool.cpp @@ -59,14 +59,14 @@ inline bool operator<(const QPair<QRunnable *, int> &p, int priority) Q_GLOBAL_STATIC(QThreadPool, theInstance) /* - QThread wrapper, provides synchronizitaion against a ThreadPool + QThread wrapper, provides synchronization against a ThreadPool */ class QThreadPoolThread : public QThread { public: QThreadPoolThread(QThreadPoolPrivate *manager); void run(); - void registerTheadInactive(); + void registerThreadInactive(); QThreadPoolPrivate *manager; QRunnable *runnable; @@ -110,7 +110,7 @@ void QThreadPoolThread::run() qWarning("Qt Concurrent has caught an exception thrown from a worker thread.\n" "This is not supported, exceptions thrown in worker threads must be\n" "caught before control returns to Qt Concurrent."); - registerTheadInactive(); + registerThreadInactive(); throw; } #endif @@ -128,7 +128,7 @@ void QThreadPoolThread::run() } while (r != 0); if (manager->isExiting) { - registerTheadInactive(); + registerThreadInactive(); break; } @@ -136,7 +136,7 @@ void QThreadPoolThread::run() bool expired = manager->tooManyThreadsActive(); if (!expired) { ++manager->waitingThreads; - registerTheadInactive(); + registerThreadInactive(); // wait for work, exiting after the expiry timeout is reached expired = !manager->runnableReady.wait(locker.mutex(), manager->expiryTimeout); ++manager->activeThreads; @@ -146,13 +146,13 @@ void QThreadPoolThread::run() } if (expired) { manager->expiredThreads.enqueue(this); - registerTheadInactive(); + registerThreadInactive(); break; } } } -void QThreadPoolThread::registerTheadInactive() +void QThreadPoolThread::registerThreadInactive() { if (--manager->activeThreads == 0) manager->noActiveThreads.wakeAll(); @@ -260,8 +260,9 @@ void QThreadPoolPrivate::startThread(QRunnable *runnable) thread.take()->start(); } -/*! \internal - Makes all threads exit, waits for each tread to exit and deletes it. +/*! + \internal + Makes all threads exit, waits for each thread to exit and deletes it. */ void QThreadPoolPrivate::reset() { @@ -332,9 +333,10 @@ bool QThreadPoolPrivate::startFrontRunnable() 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 +/*! + \internal + Searches for \a runnable in the queue, removes it from the queue and + runs it if found. This function does not return until the runnable has completed. */ void QThreadPoolPrivate::stealRunnable(QRunnable *runnable) |