std::promise
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. |
| Defined in header <future>
|
||
| template< class T > class promise; |
(1) | (ya que C + +11) |
| template< class T > class promise<T&>; |
(2) | (ya que C + +11) |
| template<> class promise<void>; |
(3) | (ya que C + +11) |
El
std::promise plantilla de clase proporciona una facilidad para almacenar un valor que se adquirió más adelante de forma asíncrona a través de un objeto std::future, que puede suministrar el std::promise .Original:
The class template
std::promise provides a facility to store a value that is later acquired asynchronously via a std::future object, that the std::promise can supply.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 section is incomplete |
[editar] Las funciones miembro
| construye el objeto promesa Original: constructs 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. (miembro público función) | |
| destructs the promise object (miembro público función) | |
| asigna el estado compartido Original: assigns 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. (miembro público función) | |
| swaps dos objetos promesa Original: swaps two promise objects 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) | |
Original: Getting the result The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| devuelve un future asociado con el resultado prometido Original: returns a future associated with the promised result 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) | |
Original: Setting the result The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| sets the result to specific value (miembro público función) | |
| establece el resultado al valor específico, mientras que la entrega de la notificación, sólo en la salida de hilo Original: sets the result to specific value while delivering the notification only at thread exit 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) | |
| 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) | |
| establece el resultado que indique una excepción durante la entrega de la notificación, sólo en la salida de hilo Original: sets the result to indicate an exception while delivering the notification only at thread exit 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) | |
[editar] Terceros funciones
| (C++11) |
el algoritmo se especializa std::swap Original: specializes the std::swap algorithm The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función de plantilla) |
[editar] Clases de ayuda
| se especializa el rasgo tipo std::uses_allocator Original: specializes the std::uses_allocator type trait The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (clase de especialización de plantilla) | |