Espaços nominais
Variantes
Acções

std::future::share

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

 
 
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::future
future::future
future::~future
future::operator=
future::share
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.
future::get
Estado
Original:
State
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
future::valid
future::wait
future::wait_for
future::wait_until
 
std::shared_future<T> share();
Transfere o estado compartilhado de *this a um objeto std::shared_future. std::shared_future objetos múltiplos podem referenciar o mesmo estado compartilhada, o que não é possível com std::future.
Original:
Transfers the shared state of *this to a std::shared_future object. Multiple std::shared_future objects may reference the same shared state, which is not possible with std::future.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Depois de chamar share em um std::future, valid()  == false.
Original:
After calling share on a std::future, valid()  == false.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Índice

[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 objeto std::shared_future contendo o estado compartilhado anteriormente detida pela *this
Original:
A std::shared_future object containing the shared state previously held by *this
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Exemplo

[editar] Veja também

espera por um valor (possivelmente relacionado por outros futuros) que é definido de forma assíncrona
Original:
waits for a value (possibly referenced by other futures) that is set asynchronously
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de classe) [edit]