std::future::share
Da 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. |
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.
You can help to correct and verify the translation. Click here for instructions.
Depois de chamar
share
em um std::future, valid() == false.Original:
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.
Í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.
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.
You can help to correct and verify the translation. Click here for instructions.
[editar] Exemplo
Esta seção está incompleta Motivo: sem exemplo |
[editar] Veja também
(C++11) |
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) |