Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

Thread Support in Qt

Qt provides thread support in the form of platform-independent threading classes, a thread-safe way of posting events, and signal-slot connections across threads. This makes it easy to develop portable multithreaded Qt applications and take advantage of multiprocessor machines. Multithreaded programming is also a useful paradigm for performing time-consuming operations without freezing the user interface of an application.

Earlier versions of Qt offered an option to build the library without thread support. Since Qt 4.0, threads are always enabled.

Topics:

Recommended Reading

This document is intended for an audience that has knowledge of, and experience with, multithreaded applications. If you are new to threading see our Recommended Reading list:

The Threading Classes

These classes are relevant to threaded applications.

Asynchronous Run

The <QtConcurrentRun> header provides a way to run a function in a separate thread.

Concurrent Filter and Filter-Reduce

The <QtConcurrentFilter> header provides concurrent Filter and Filter-Reduce.

Concurrent Map and Map-Reduce

The <QtConcurrentMap> header provides concurrent Map and MapReduce.

QAtomicInt

Platform-independent atomic operations on integers

QAtomicPointer

Template class that provides platform-independent atomic operations on pointers

QFuture

Represents the result of an asynchronous computation

QFutureSynchronizer

Convenience class that simplifies QFuture synchronization

QFutureWatcher

Allows monitoring a QFuture using signals and slots

QMutex

Access serialization between threads

QMutexLocker

Convenience class that simplifies locking and unlocking mutexes

QReadLocker

Convenience class that simplifies locking and unlocking read-write locks for read access

QReadWriteLock

Read-write locking

QRunnable

The base class for all runnable objects

QSemaphore

General counting semaphore

QThread

Platform-independent threads

QThreadPool

Manages a collection of QThreads

QThreadStorage

Per-thread data storage

QWaitCondition

Condition variable for synchronizing threads

QWriteLocker

Convenience class that simplifies locking and unlocking read-write locks for write access

QtConcurrent

High-level APIs that make it possible to write multi-threaded programs without using low-level threading primitives

Note: Qt's threading classes are implemented with native threading APIs; e.g., Win32 and pthreads. Therefore, they can be used with threads of the same native API.

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web