std::atomic::load
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. |
<metanoindex/>
<tbody> </tbody> T load( memory_order = std::memory_order_seq_cst ) const; |
(desde C++11) | |
T load( memory_order = std::memory_order_seq_cst ) const volatile; |
(desde C++11) | |
Atomicamente cargas e retorna o valor atual da variável atômica. A memória é afectada de acordo com o valor de
memory_order.Original:
Atomically loads and returns the current value of the atomic variable. Memory is affected according to the value of
memory_order.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.
memory_order deve ser um dos std::memory_order_relaxed, std::memory_order_consume, std::memory_order_acquire ou std::memory_order_seq_cst. Caso contrário, o comportamento é indefinido.Original:
memory_order must be one of std::memory_order_relaxed, std::memory_order_consume, std::memory_order_acquire or std::memory_order_seq_cst. Otherwise the behavior is undefined.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.
Parâmetros
| memory_order | - | restrições de ordem memória de aplicar
Original: memory order constraints to enforce The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Valor de retorno
O valor atual da variável atômica.
Original:
The current value of the atomic variable.
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.
Exceções
Veja também
carrega um valor de um objeto atômico Original: loads a value from an atomic object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (função pública membro) | |
(C++11) (C++11) |
atomicamente obtém o valor armazenado em um objeto atómico Original: atomically obtains the value stored in an atomic object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de função) |