I have been working with C++11 memory order:
Many documents suggest to use memory_order_acq_rel with Read Modify Write operations. Does this mean every time we use atomic_compare_and_exchange, we should use memory_order_acq_rel?? Since atomic_compare_and_exchange is a read modify write operation.
But in many example I have see people using only memory_order_rel.
Can some one please shed some light on this...
Aucun commentaire:
Enregistrer un commentaire