std::promise::set_value_at_thread_exit
De cppreference.com
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
void set_value_at_thread_exit( const R& value ); |
(1) | ( seul membre de )promise modèle génériqueOriginal: member only of generic promise templateThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (depuis C++11) |
void set_value_at_thread_exit( R&& value ); |
(2) | ( seul membre de )promise modèle génériqueOriginal: member only of generic promise templateThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (depuis C++11) |
void set_value_at_thread_exit( R& value ); |
(3) | ( seul membre de spécialisation de template )promise<R&> Original: member only of promise<R&> template specializationThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (depuis C++11) |
void set_value_at_thread_exit() |
(4) | ( seul membre de spécialisation de template )promise<void> Original: member only of promise<void> template specializationThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (depuis C++11) |
Enregistre le
value
dans l'état partagé sans faire l'état prêt immédiatement. L'Etat est prêt lorsque le thread courant, après toutes les variables de thread local durée de stockage ont été détruits .Original:
Stores the
value
into the shared state without making the state ready immediately. The state is made ready when the current thread exits, after all variables with thread-local storage duration have been destroyed.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
L'opération est atomique, c'est à dire qu'il se comporte comme si elles acquièrent un seul mutex associé à l'objet promesse en mettant à jour l'objet promesse .
Original:
The operation is atomic, i.e. it behaves as though they acquire a single mutex associated with the promise object while updating the promise object.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Une exception est levée si aucun état partagé ou l'état partagé stocke déjà une valeur ou d'exception .
Original:
An exception is thrown if there is no shared state or the shared state already stores a value or exception.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Sommaire |
[modifier] Paramètres
value | - | valeur à stocker dans l'état partagé
Original: value to store in the shared state The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[modifier] Retourne la valeur
(Aucun)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[modifier] Exceptions
std::future_error dans les conditions suivantes:
Original:
std::future_error on the following conditions:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
- *this n'a pas d'état partagé. La catégorie d'erreur est mis à no_state .Original:*this has no shared state. The error category is set to no_state.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- L'état partagé stocke déjà une valeur ou d'exception. La catégorie d'erreur est mis à promise_already_satisfied .Original:The shared state already stores a value or exception. The error category is set to promise_already_satisfied.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
En outre:
Original:
Additionally:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
1-2)
Toute exception levée par le constructeur de copie de
value
Original:
Any exception thrown by the copy constructor of
value
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
3)
Toute exception levée par le constructeur mouvement de
value
Original:
Any exception thrown by the move constructor of
value
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[modifier] Exemple
This section is incomplete Reason: no example |
[modifier] Voir aussi
définit le résultat à la valeur spécifique Original: sets the result to specific value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre publique) |