std::atomic::store
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> void store( T desired, memory_order = std::memory_order_seq_cst ); |
(desde C++11) | |
void store( T desired, memory_order = std::memory_order_seq_cst ) volatile; |
(desde C++11) | |
Atomicamente substitui o valor atual com
desired. A memória é afectada de acordo com o valor de memory_order.Original:
Atomically replaces the current value with
desired. 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_release 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_release 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
| desired | - | o valor para armazenar na variável atômica
Original: the value to store into 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. |
| 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
(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.
Exceções
Veja também
armazena um valor em um objeto atômico Original: stores a value into 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 substitui o valor do objeto atômico com um argumento não-atômica Original: atomically replaces the value of the atomic object with a non-atomic argument 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) |