From 735f4851843892a9562dbd59b319d436dc04055b Mon Sep 17 00:00:00 2001 From: David Faure Date: Fri, 21 Jun 2013 14:21:02 +0200 Subject: QThreadPool: fix typos Task-number: QTBUG-31919 Backport from qtbase/37dc44d499884bd0d7ab9d2f1547db468c9fe53b Change-Id: I9496b059ed201da6b7a5ec02c4acb8f231e40c30 Reviewed-by: Thiago Macieira --- src/corelib/concurrent/qthreadpool.cpp | 26 ++++++++++++++------------ 1 file 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 &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) -- cgit v0.12