Espaços nominais
Variantes
Acções

std::promise::get_future

Da cppreference.com
< cpp‎ | thread‎ | promise

 
 
Biblioteca de suporte a discussão
Threads
Original:
Threads
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(C++11)
this_thread namespace
Original:
this_thread namespace
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(C++11)
(C++11)
(C++11)
Exclusão mútua
Original:
Mutual exclusion
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(C++11)
Gestão de bloqueio genérico
Original:
Generic lock management
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(C++11)
(C++11)
(C++11)
(C++11)(C++11)(C++11)
Variáveis ​​de condição
Original:
Condition variables
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(C++11)
Futuros
Original:
Futures
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(C++11)
(C++11)
(C++11)
(C++11)
 
std::promise
Funções de membro
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
promise::promise
promise::~promise
promise::operator=
promise::swap
Obtendo o resultado
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.
promise::get_future
Definir o resultado
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.
promise::set_value
promise::set_value_at_thread_exit
promise::set_exception
promise::set_exception_at_thread_exit
 
std::future<R> get_future();
(desde C++11)
Retorna um objeto futuro associado com o mesmo estado compartilhado como *this.
Original:
Returns a future object associated with the same shared state as *this.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Exceção é lançada se *this não tem estado compartilhado ou get_future já foi chamado.
Original:
Exception is thrown if *this has no shared state or get_future has already been called.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Parâmetros

(Nenhum)
Original:
(none)
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

Um futuro referindo-se ao estado compartilhado de *this
Original:
A future referring to the shared state of *this
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Exceções

std::future_error com as seguintes condições:
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.
  • *this não tem estado compartilhado. A categoria de erro é definido para 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.
  • get_future() já foi chamado em uma promessa com o mesmo estado compartilhado como *this. A categoria de erro é definido para future_already_retrieved.
    Original:
    get_future() has already been called on a promise with the same shared state as *this. The error category is set to future_already_retrieved.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.