Espaces de noms
Variantes
Affichages
Actions

Thread support library

De cppreference.com.
< cpp

 
 
Bibliothèque 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 générique
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)
 

C++ includes built-in support for threads, mutual exclusion, condition variables, and futures.

Sommaire

[modifier] Threads

Threads enable programs to execute across several processor cores.

Defined in header <thread>
(C++11)
gère un thread séparé
Original:
manages a separate thread
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe) [edit]
Functions managing the current thread
Defined in namespace this_thread
(C++11)
suggests that the implementation reschedule execution of threads
(fonction) [edit]
(C++11)
retourne l'id du thread courant
Original:
returns the thread id of the current thread
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)
arrête l'exécution du thread courant pendant une durée de temps spécifiée
Original:
stops the execution of the current thread for a specified time duration
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)
arrête l'exécution du thread en cours jusqu'à un point dans le temps spécifié
Original:
stops the execution of the current thread until a specified time point
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction) [edit]

[modifier] L'exclusion mutuelle

Mutual exclusion algorithms prevent multiple threads from simultaneously accessing shared resources. This prevents data races and provides support for synchronization between threads.

Defined in header <mutex>
(C++11)
offre de base usine d'exclusion mutuelle
Original:
provides basic mutual exclusion facility
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)
fournit le service d'exclusion mutuelle qui implémente verrouillage avec un délai d'attente
Original:
provides mutual exclusion facility which implements locking with a timeout
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe) [edit]
fournit le service d'exclusion mutuelle qui peut être verrouillé de manière récursive par le même thread
Original:
provides mutual exclusion facility which can be locked recursively by the same thread
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe) [edit]
fournit le service d'exclusion mutuelle qui peut être verrouillé recursively
par le même fil et des outils de verrouillage avec un délai d'attente
Original:
provides mutual exclusion facility which can be locked recursively
by the same thread and implements locking with a timeout
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe) [edit]
Generic mutex management
(C++11)
met en œuvre un wrapper mutex strictement la portée 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 générique) [edit]
(C++11)
met en œuvre emballage mobile propriété 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 générique) [edit]
type de variable permet de spécifier la stratégie 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 spécifier la stratégie 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]
Generic locking algorithms
(C++11)
tente d'obtenir la propriété des mutex via des appels répétés à 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 générique) [edit]
(C++11)
verrouille les mutex, les blocs spécifiés le cas échéant 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 générique) [edit]
Appelez fois
Original:
Call once
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(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, même si elle est appelée 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 générique) [edit]

[modifier] Les variables de condition

A condition variable is a synchronization primitive that allows multiple threads to communicate with eachother. It allows some number of threads to wait (possibly with a timeout) for notification from another thread that they may proceed. A condition variable is always associated with a mutex.

Defined in header <condition_variable>
provides a condition variable associated with a std::unique_lock
(classe)
provides a condition variable associated with any lock type
(classe)
schedules a call to notify_all to be invoked when this thread is completely finished
(fonction)
(C++11)
lists the possible results of timed waits on condition variables
(enum)

[modifier] Futures

The standard library provides facilities to obtain values that are returned and to catch exceptions that are thrown by asynchronous tasks (i.e. functions launched in separate threads). These values are communicated in a shared state, in which the asynchronous task may write its return value or store an exception, and which may be examined, waited for, and otherwise manipulated by other threads that hold instances of std::future or std::shared_future that reference that shared state.

Defined in header <future>
(C++11)
stocke une valeur pour une récupération 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 générique) [edit]
paquets d'une fonction pour stocker sa valeur de retour pour la récupération 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 générique) [edit]
(C++11)
attend une valeur qui est définie de manière 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 générique) [edit]
attend une valeur (peut-être référencé par d'autres futurs) qui est fixé de manière 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 générique) [edit]
(C++11)
exécute une fonction asynchrone (potentiellement dans un nouveau thread) et renvoie une std::future qui contiendra le résultat
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 générique) [edit]
(C++11)
spécifie 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]
précise les résultats de chronométrés temps d'attente effectuée 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 liée 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 catégorie 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]