summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/thread')
-rw-r--r--src/corelib/thread/qatomic.cpp2
-rw-r--r--src/corelib/thread/qfuture.qdoc6
-rw-r--r--src/corelib/thread/qfuturewatcher.cpp4
-rw-r--r--src/corelib/thread/qreadwritelock.cpp1
-rw-r--r--src/corelib/thread/qsemaphore.cpp2
-rw-r--r--src/corelib/thread/qthread.cpp2
-rw-r--r--src/corelib/thread/qthread_unix.cpp3
-rw-r--r--src/corelib/thread/qthreadpool.cpp2
-rw-r--r--src/corelib/thread/qthreadstorage.cpp2
9 files changed, 12 insertions, 12 deletions
diff --git a/src/corelib/thread/qatomic.cpp b/src/corelib/thread/qatomic.cpp
index 5c3ad9412f..0a15284c87 100644
--- a/src/corelib/thread/qatomic.cpp
+++ b/src/corelib/thread/qatomic.cpp
@@ -67,7 +67,7 @@
The template parameter \c T must be a C++ integer type:
\list
- \li 8-bit: char, signed char, unsigned char, qint8, quint8
+ \li 8-bit: bool, char, signed char, unsigned char, qint8, quint8, char8_t (C++20)
\li 16-bit: short, unsigned short, qint16, quint16, char16_t (C++11)
\li 32-bit: int, unsigned int, qint32, quint32, char32_t (C++11)
\li 64-bit: long long, unsigned long long, qint64, quint64
diff --git a/src/corelib/thread/qfuture.qdoc b/src/corelib/thread/qfuture.qdoc
index 076725e19c..e6bc937d85 100644
--- a/src/corelib/thread/qfuture.qdoc
+++ b/src/corelib/thread/qfuture.qdoc
@@ -51,7 +51,7 @@
(QFuture::const_iterator). Using these iterators is another way to access
results in the future.
- QFuture also offers ways to interact with a runnning computation. For
+ QFuture also offers ways to interact with a running computation. For
instance, the computation can be canceled with the cancel() function. To
pause the computation, use the setPaused() function or one of the pause(),
resume(), or togglePaused() convenience functions. Be aware that not all
@@ -125,8 +125,8 @@
/*! \fn template <typename T> void QFuture<T>::cancel()
Cancels the asynchronous computation represented by this future. Note that
- the cancelation is asynchronous. Use waitForFinished() after calling
- cancel() when you need synchronous cancelation.
+ the cancellation is asynchronous. Use waitForFinished() after calling
+ cancel() when you need synchronous cancellation.
Results currently available may still be accessed on a canceled future,
but new results will \e not become available after calling this function.
diff --git a/src/corelib/thread/qfuturewatcher.cpp b/src/corelib/thread/qfuturewatcher.cpp
index ecde665e1f..6be624d234 100644
--- a/src/corelib/thread/qfuturewatcher.cpp
+++ b/src/corelib/thread/qfuturewatcher.cpp
@@ -114,8 +114,8 @@ QFutureWatcherBase::QFutureWatcherBase(QObject *parent)
/*! \fn template <typename T> void QFutureWatcher<T>::cancel()
Cancels the asynchronous computation represented by the future(). Note that
- the cancelation is asynchronous. Use waitForFinished() after calling
- cancel() when you need synchronous cancelation.
+ the cancellation is asynchronous. Use waitForFinished() after calling
+ cancel() when you need synchronous cancellation.
Currently available results may still be accessed on a canceled QFuture,
but new results will \e not become available after calling this function.
diff --git a/src/corelib/thread/qreadwritelock.cpp b/src/corelib/thread/qreadwritelock.cpp
index 63637ae05b..9dd8503116 100644
--- a/src/corelib/thread/qreadwritelock.cpp
+++ b/src/corelib/thread/qreadwritelock.cpp
@@ -453,6 +453,7 @@ QReadWriteLock::StateForWaitCondition QReadWriteLock::stateForWaitCondition() co
if (!d)
return Unlocked;
+ const auto lock = qt_scoped_lock(d->mutex);
if (d->writerCount > 1)
return RecursivelyLocked;
else if (d->writerCount == 1)
diff --git a/src/corelib/thread/qsemaphore.cpp b/src/corelib/thread/qsemaphore.cpp
index 3ecdee3747..cc8099f4d4 100644
--- a/src/corelib/thread/qsemaphore.cpp
+++ b/src/corelib/thread/qsemaphore.cpp
@@ -585,7 +585,7 @@ bool QSemaphore::tryAcquire(int n, int timeout)
/*!
\fn QSemaphoreReleaser::swap(QSemaphoreReleaser &other)
- Exchanges the responsibilites of \c{*this} and \a other.
+ Exchanges the responsibilities of \c{*this} and \a other.
Unlike move assignment, neither of the two objects ever releases its
semaphore, if any, as a consequence of swapping.
diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp
index b5bd6d0378..f95f08d776 100644
--- a/src/corelib/thread/qthread.cpp
+++ b/src/corelib/thread/qthread.cpp
@@ -256,7 +256,7 @@ QThreadPrivate::~QThreadPrivate()
\section1 Managing Threads
- QThread will notifiy you via a signal when the thread is
+ QThread will notify you via a signal when the thread is
started() and finished(), or you can use isFinished() and
isRunning() to query the state of the thread.
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp
index f6499b38d0..a27782d37c 100644
--- a/src/corelib/thread/qthread_unix.cpp
+++ b/src/corelib/thread/qthread_unix.cpp
@@ -169,8 +169,7 @@ static void set_thread_data(QThreadData *data)
static void clear_thread_data()
{
- currentThreadData = nullptr;
- pthread_setspecific(current_thread_data_key, nullptr);
+ set_thread_data(nullptr);
}
template <typename T>
diff --git a/src/corelib/thread/qthreadpool.cpp b/src/corelib/thread/qthreadpool.cpp
index 40cc646519..cdeb077233 100644
--- a/src/corelib/thread/qthreadpool.cpp
+++ b/src/corelib/thread/qthreadpool.cpp
@@ -417,7 +417,7 @@ void QThreadPoolPrivate::stealAndRunRunnable(QRunnable *runnable)
\ingroup thread
- QThreadPool manages and recyles individual QThread objects to help reduce
+ QThreadPool manages and recycles individual QThread objects to help reduce
thread creation costs in programs that use threads. Each Qt application
has one global QThreadPool object, which can be accessed by calling
globalInstance().
diff --git a/src/corelib/thread/qthreadstorage.cpp b/src/corelib/thread/qthreadstorage.cpp
index 464559ffa5..3e111ecdc0 100644
--- a/src/corelib/thread/qthreadstorage.cpp
+++ b/src/corelib/thread/qthreadstorage.cpp
@@ -225,7 +225,7 @@ void QThreadStorageData::finish(void **p)
The hasLocalData() function allows the programmer to determine if
data has previously been set using the setLocalData() function.
- This is also useful for lazy initializiation.
+ This is also useful for lazy initialization.
If T is a pointer type, QThreadStorage takes ownership of the data
(which must be created on the heap with \c new) and deletes it when