Boost logo

Boost Users :

Subject: Re: [Boost-users] intrusive_ptr and multi-threading
From: Andrej van der Zee (andrejvanderzee_at_[hidden])
Date: 2011-06-13 08:10:41


Thanks for your reply.

> No, you shouldn't use these macros. They are Windows-specific and correspond
> to InterlockedIncrement/InterlockedDecrement but don't require the inclusion
> of windows.h. If you are targeting the new C++0x, use std::atomic;
> otherwise, until Boost.Atomic is available, you may try
> boost::detail::atomic_count. It's, however, undocumented.

I am using boost::detail::atomic_count now. I saw it is implemented
using a scoped_lock for pthreads. Is there any advantage of using
C++0x in terms of performance on Linux?


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at