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 ); |
(desde C++11) | |
Almacena el puntero
p
excepción en el estado compartido sin que el estado de preparado de inmediato. El estado está preparado cuando el hilo termina actuales, después de todas las variables de subproceso local con duración de almacenamiento han sido destruidos . 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.
La operación es atómica, es decir, que se comporta como si adquirir un mutex único asociado con el objeto promesa mientras se actualiza el objeto promesa .
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.
Se produce una excepción si no hay un estado compartido o el estado compartido ya almacena un valor o una excepción .
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.
Contenido |
[editar] Parámetros
p | - | excepción de puntero a la tienda
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. |
[editar] Valor de retorno
(Ninguno)
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.
[editar] Excepciones
std::future_error en las siguientes condiciones:
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 no tiene un estado compartido. La categoría de error se establece en 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.
- El estado compartido ya almacena un valor o una excepción. La categoría de error se establece en 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.
[editar] Ejemplo
This section is incomplete Reason: no example |
[editar] Ver también
establece el resultado para indicar una excepción 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. (miembro público función) |