线程类

这些 Qt Core 类为应用程序提供了线程支持。“Qt 中的多线程”页面介绍了如何使用这些类。

Concurrent Filter and Filter-Reduce

从序列中选择值并将其组合,所有操作均并行进行

Concurrent Map and Map-Reduce

对序列中的值进行转换并将其组合,所有操作均并行进行

Concurrent Run

在单独线程中运行任务的简便方法

Concurrent Task

在单独线程中运行任务的可配置方法

QAtomicInteger

针对整数的跨平台原子操作

QAtomicPointer

提供针对指针的、与平台无关的原子操作的模板类

QFuture

表示异步计算的结果

QFutureSynchronizer

用于简化 QFuture 同步的便捷类

QFutureWatcher

允许使用信号和槽来监视 QFuture

QMutex

在线程间访问序列化

QMutexLocker

用于简化互斥锁加锁和解锁的便捷类

QPromise

将计算结果存储以便 QFuture 访问的方法

QReadLocker

用于简化读写锁的加锁和解锁操作(仅限读取访问)的便捷类

QReadWriteLock

读写锁

QRecursiveMutex

线程间的访问串行化

QRunnable

所有可运行对象的基类

QSemaphore

通用计数信号量

QSemaphoreReleaser

对 QSemaphore::release() 调用的异常安全延迟

QThread

管理线程的跨平台方法

QThreadPool

管理一组 QThread 实例

QThreadStorage

按线程的数据存储

QWaitCondition

用于线程同步的条件变量

QWriteLocker

用于简化写入操作中读写锁的加锁和解锁的便利类

QtConcurrent

高级 API,使开发者无需使用低级线程原语即可编写多线程程序

QtConcurrent::QTaskBuilder

用于调整任务参数

QtFuture::WhenAnyResult

QtFuture::WhenAnyResult 用于表示 QtFuture::whenAny() 的结果

QAtomicInteger::qYieldCpu()

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.