std::promise
Da cppreference.com.
![]() |
Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.
La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
Elemento definito nell'header <future>
|
||
template< class T > class promise; |
(1) | (dal C++11) |
template< class T > class promise<T&>; |
(2) | (dal C++11) |
template<> class promise<void>; |
(3) | (dal C++11) |
Il
std::promise
modello di classe fornisce una funzione per memorizzare un valore che viene poi acquisita in modo asincrono tramite un oggetto std::future, che il std::promise
in grado di fornire.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 |
[modifica] Membri funzioni
costruisce l'oggetto di promessa 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. (metodo pubblico) | |
destructs the promise object (metodo pubblico) | |
assegna lo stato condiviso 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. (metodo pubblico) | |
swap due oggetti promessa 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. (metodo pubblico) | |
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. | |
restituisce un future associato al risultato promesso 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. (metodo pubblico) | |
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 (metodo pubblico) | |
imposta il risultato al valore specifico offrendo allo stesso tempo la notifica solo dal thread 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. (metodo pubblico) | |
imposta il risultato per indicare un'eccezione 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. (metodo pubblico) | |
imposta il risultato per indicare un'eccezione offrendo allo stesso tempo la notifica solo dal thread 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. (metodo pubblico) |
[modifica] Non membri funzioni
(C++11) |
specializzata l'algoritmo 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. (funzione di modello) |
[modifica] Helper classi
specializzata il tratto 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. (classe modello di specializzazione) |