Mutex and Atomics

To protect value with a simple mutex.

The other way is using unique_lock but it locks threat critically

New Memory model Atomic

Atomic brings us a secure model to reach data on memory. However, it is slower than the simple mutex operation, atomic types make us sure about memory sharing.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *