28 Jan
2009
28 Jan
'09
6:38 a.m.
On Tue, Jan 27, 2009 at 01:55:31PM -0800, Radosavljevic, Branko wrote:
but I'd rather not. I assume that if I want to use Boost.Thread, I'll need to use a mutex, but I don't see any discussion of memory fence issues in the documentation.
POSIX mutexes gurantee that proper fences will be applied at the right spots. My guess is that the same holds also on Windows, but you should check with the documentation. (If you're using x86/x64, all atomic instructions are also acquire/release fences.)