Quantcast
Channel: With C++ concurrency, do I need to use mutual exclusion? - Stack Overflow
Browsing all 5 articles
Browse latest View live

Answer by Desmond Hume for With C++ concurrency, do I need to use mutual...

As long as your 32 bit int is properly aligned in memory, and I'm guessing that it is because it's by default on most modern platforms, reading that int is practically thread-safe.

View Article



Answer by marko for With C++ concurrency, do I need to use mutual exclusion?

As you describe this problem, it is already threadsafe provided you have only one writer (assuming the code runs on a 32-bit or higher word-width processor - in which case the 32-bit write is...

View Article

Answer by Coffee for With C++ concurrency, do I need to use mutual exclusion?

It depends what you are using for your current value table. If you're using a database like SQLServer, then you shouldn't have any worries because the database will handle it.If you're using the file...

View Article

Answer by Jerry Coffin for With C++ concurrency, do I need to use mutual...

A lot here depends on what sort of platform you're using to support the threading. If you have atomic types available, you can just use those. Otherwise, yes, you're pretty much stuck with a mutex (of...

View Article

With C++ concurrency, do I need to use mutual exclusion?

I have to design an app that reads UDP data off the local net and stores the data in a Current Value Table (CVT). Then, a separate thread will come along and read the values out of the CVT, massage...

View Article

Browsing all 5 articles
Browse latest 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>