std::atomic::exchange
Da cppreference.com.
![]() |
Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.
La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
T exchange( T desired, memory_order = std::memory_order_seq_cst ); |
(dal C++11) | |
T exchange( T desired, memory_order = std::memory_order_seq_cst ) volatile; |
(dal C++11) | |
Sostituisce atomico il valore sottostante con
desired
. L'operazione è lettura-modifica-scrittura. Memoria è influenzata in base al valore di memory_order
.Original:
Atomically replaces the underlying value with
desired
. The operation is read-modify-write operation. 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.
Indice |
[modifica] Parametri
desired | - | valore da assegnare
Original: value to assign The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
memory_order | - | vincoli di ordine di memoria da far rispettare
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. |
[modifica] Valore di ritorno
Il valore della variabile atomica prima della chiamata.
Original:
The value of the atomic variable before the call.
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.
[modifica] Eccezioni
[modifica] Vedi anche
(C++11) (C++11) |
sostituisce atomicamente il valore dell'oggetto atomica con non-atomica argomento e restituisce il vecchio valore del atomica Original: atomically replaces the value of the atomic object with non-atomic argument and returns the old value of the atomic The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (funzione di modello) |