[ Web Proxy ]
URL:
Viewing: https://fr.cppreference.com/cpp/thread [Back]  [Original]

Bibliothque pour les processus lgers (threads) cppreference.com
cppreference.com
Espaces de noms
Variantes

Bibliothque pour les processus lgers (threads)

De cppreference.com
< cpp
 
 
Bibliothque de support fil
Threads
Original:
Threads
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
thread (C++11)
this_thread espace de noms
Original:
this_thread namespace
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
get_id (C++11)
yield (C++11)
sleep_for (C++11)
sleep_until (C++11)
L'exclusion mutuelle
Original:
Mutual exclusion
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
mutex (C++11)
timed_mutex (C++11)
Gestion du verrouillage gnrique
Original:
Generic lock management
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
lock_guard (C++11)
unique_lock (C++11)
defer_lock_t
try_to_lock_t
adopt_lock_t
(C++11)
(C++11)
(C++11)
lock (C++11)
try_lock (C++11)
defer_lock
try_to_lock
adopt_lock
(C++11)
(C++11)
(C++11)
Les variables de condition
Original:
Condition variables
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
condition_variable (C++11)
condition_variable_any (C++11)
notify_all_at_thread_exit (C++11)
cv_status (C++11)
Futures
Original:
Futures
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
promise (C++11)
future (C++11)
shared_future (C++11)
packaged_task (C++11)
async (C++11)
launch (C++11)
future_status (C++11)
future_error (C++11)
future_category (C++11)
future_errc (C++11)
 

Le C++ supporte nativement les processus lgers (threads), les verrous d'exclusion mutuelle (mutex), la synchronisation par variables conditionnelles et la gestion de tches asynchrones (futures).

Processus lgers (threads)

Les processus lgers permettent un programme de s'excuter sur plusieurs curs d'un processeur simultanment.

Defined in header <thread>
(C++11)
gre un thread spar
(classe) [edit]
Fonction grant le processus lger courant
Defined in namespace this_thread
(C++11)
suggre que l'implmentation rchelonne l'excution des threads
(fonction) [edit]
(C++11)
retourne l'id du thread courant
(fonction) [edit]
(C++11)
arrte l'excution du thread courant pendant la dure spcifie
(fonction) [edit]
(C++11)
arrte l'excution du thread en cours jusqu' un point spcifi dans le temps
(fonction) [edit]

Exclusion mutuelle

Les algorithmes base d'exclusion mutuelle empchent plusieurs processeurs lgers d'accder de manire simultane des ressources partages. Cela permet d'viter des accs concurrents et permet la synchronisation entre les processus lgers.

Defined in header <mutex>
(C++11)
fournit un mutex de base
(classe) [edit]
(C++11)
fournit un mutex implmentant le vrrouillage avec dlai d'attente
(classe) [edit]
fournit le mutex qui peut tre verrouill de manire rcursive par le mme thread
(classe) [edit]
fournit le mutex qui peut tre verrouill rcursivement par le mme thread et qui implmente le vrouillage avec dlai d'attente
(classe) [edit]
Gestion des mutex
(C++11)
met en uvre un wrapper mutex strictement la porte de l'appropriation
Original:
implements a strictly scope-based mutex ownership wrapper
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe gnrique) [edit]
(C++11)
met en uvre emballage mobile proprit mutex
Original:
implements movable mutex ownership wrapper
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe gnrique) [edit]
type de variable permet de spcifier la stratgie de verrouillage
Original:
tag type used to specify locking strategy
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe) [edit]
constantes tag utilis pour spcifier la stratgie de verrouillage
Original:
tag constants used to specify locking strategy
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(constante) [edit]
Algorithmes gnriques de verrou
(C++11)
tente d'obtenir la proprit des mutex via des appels rpts try_lock
Original:
attempts to obtain ownership of mutexes via repeated calls to try_lock
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction gnrique) [edit]
(C++11)
verrouille les mutex, les blocs spcifis le cas chant ne sont pas disponibles
Original:
locks specified mutexes, blocks if any are unavailable
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction gnrique) [edit]
Appel de fonction unique
(C++11)
objet d'aide pour s'assurer que call_once invoque la fonction qu'une seule fois
Original:
helper object to ensure that call_once invokes the function only once
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe) [edit]
(C++11)
appelle une fonction qu'une seule fois, mme si elle est appele par plusieurs threads
Original:
invokes a function only once even if called from multiple threads
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction gnrique) [edit]

Les variables conditionnelles

Une variable conditionnelle est une primitive de synchronisation qui permet plusieurs processus lgers de communiquer entre eux. Cela permet qu'un certain nombre de processus lgers attendent (avec expiration possible) une notification de la part d'un autre processus lger pour qu'ils puissent continuer. Une variable conditionnelle est toujours associe un mutex.

Defined in header <condition_variable>
fournit une variable conditionnelle associe un std::unique_lock
(classe)
fournit une variable conditionnelle associe n'importe quel type de verrou
(classe)
prvoit un appel de notify_all qui sera excut lorsque ce processus lger sera termin compltement
(fonction)
(C++11)
liste les rsultats possibles d'attente chronomtre sur des variables conditionnelles
(enum)

Futures / Asynchronisme

La librairie standard fournit des outils pour obtenir les valeurs de retour ou rattraper les exceptions qui sont renvoyes par des tches asynchrones (c'est--dire des fonctions lances dans des processus lgers spars). Ces valeurs sont communiques dans un tat partag, tat dans lequel la tche asynchrone peut crire sa valeur de retour ou stocker une exception, et par ailleurs tat dans lequel ces valeurs peuvent tre utilises, attendues ou manipules par d'autres processus lgers qui dtiennent une instance de std::future ou std::shared_future qui fait rfrence cet tat partag.

Defined in header <future>
(C++11)
stocke une valeur pour une rcupration asynchrone
Original:
stores a value for asynchronous retrieval
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe gnrique) [edit]
paquets d'une fonction pour stocker sa valeur de retour pour la rcupration asynchrone
Original:
packages a function to store its return value for asynchronous retrieval
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe gnrique) [edit]
(C++11)
attend une valeur qui est dfinie de manire asynchrone
Original:
waits for a value that is set asynchronously
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe gnrique) [edit]
attend une valeur (peut-tre rfrenc par d'autres futurs) qui est fix de manire asynchrone
Original:
waits for a value (possibly referenced by other futures) that is set asynchronously
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe gnrique) [edit]
(C++11)
excute une fonction asynchrone (potentiellement dans un nouveau thread) et renvoie une std::future qui contiendra le rsultat
Original:
runs a function asynchronously (potentially in a new thread) and returns a std::future that will hold the result
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction gnrique) [edit]
(C++11)
spcifie la politique de lancement de std::async
Original:
specifies the launch policy for std::async
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(enum) [edit]
prcise les rsultats de chronomtrs temps d'attente effectue sur std::future et std::shared_future
Original:
specifies the results of timed waits performed on std::future and std::shared_future
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(enum) [edit]
Future errors
signale une erreur lie aux contrats terme ou des promesses
Original:
reports an error related to futures or promises
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe) [edit]
identifie la catgorie d'erreur avenir
Original:
identifies the future error category
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction) [edit]
(C++11)
identifie les codes d'erreur futures
Original:
identifies the future error codes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(enum) [edit]

Web Proxy Viewer  |  New URL  |  Original Page