std::promise::set_exception_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_exception_at_thread_exit(std::exception_ptr p ); | (depuis C++11) | |
Stocke le pointeur
p
exception 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 exception pointer
p
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
p | - | exception de pointeur pour stocker Original: exception pointer to store 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.
[modifier]Exemple
This section is incomplete Reason: no example |
[modifier]Voir aussi
établit le résultat pour indiquer une exception Original: sets the result to indicate an exception 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) |