gpt4 book ai didi

qt - Qt 4.3 中的线程池

转载 作者:行者123 更新时间:2023-12-04 13:19:15 27 4
gpt4 key购买 nike

有什么方法可以在 Qt 4.3 中使用线程池吗?我知道它现在已经在 Qt 4.5 中实现了。但是它是否也可以在 Qt 4.3 中使用?

最佳答案

Qt Labs 获取 QtConcurrent 的第一个版本项目。此版本的 QtConcurrent 与 Qt4.2 兼容,但建议使用 4.3。

From Qt Labs ...
Qt Concurrent

Platforms: Windows, Linux, Mac Qt
version: 4.2 required, 4.3 recommended.

Qt Concurrent is a C++ template library for writing multi-threaded applications.
Qt Concurrent provides high-level APIs that makes it possible to write multi-threaded programs withouth using low-level threading primitives such as critcal sections, mutexes or wait conditions.
Programs written with Qt Concurrent automaticallly adjust the number of threads used according to the number of processor cores available. This means that applications written today will continue to scale when deployed on multi-core systems in the future.

The library includes functional programming style APIs for for parallel list prosessing, a MapReduce implementation for shared-memory (non-distributed) systems, and classes for managing asynchronous computations in GUI applications.

The code can be checked out with subversion: svn checkout svn://labs.trolltech.com/svn/threads/qtconcurrent qtconcurrent
If you don't have svn, you can download a package instead.

关于qt - Qt 4.3 中的线程池,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1716309/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com