Quantcast
Channel: Is it possible to create an atomic vector or array in C++? - Stack Overflow
Browsing latest articles
Browse All 3 View Live

Answer by The Quantum Physicist for Is it possible to create an atomic vector...

You can put arrays in atomics, but not directly. Like the other answer explain you can use std::array. I answered this question and explained how to do something similar for a struct.Having said that...

View Article



Answer by Martin Bonner supports Monica for Is it possible to create an...

In practice, at the CPU level, there are instructions which can atomically update an int, and a good compiler will use these for std::atomic<int>. In contrast, there are are no instructions which...

View Article

Is it possible to create an atomic vector or array in C++?

I have some code which uses an array of int (int[]) in a thread which is activated every second.I use lock() from std::mutex to lock this array in this thread.However I wonder if there is a way to...

View Article
Browsing latest articles
Browse All 3 View Live




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>