Quantcast
Channel: Want an efficient way to swap two pointers in C++ - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Want an efficient way to swap two pointers in C++

$
0
0

I have two pointers which point to a big graph object in a multi-threading C++ app.I try to swap them every 5 minutes. Which way is safe and has the best performance?Is C++11 atomic<> a good choice?


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





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>