#include <boost/static_assert.hpp>
#include <qi/config.hpp>
#include <qi/macro.hpp>
Go to the source code of this file.
Value:
while (!
QI_UNIQ_DEF(atomic_guard_a).setIfEquals(1, 1)) \
{ \
bool tok =
QI_UNIQ_DEF(atomic_guard_b).setIfEquals(0,1); \
if (tok) \
{ \
code; \
} \
}
Execute code once, parallel calls are blocked until code finishes.
Definition at line 214 of file atomic.hpp.
Accept a list of pointers (expected to be static function variables) and new them once in a thrad-safe manner. Implementation aims for minimal overhead when initialization is done.
Definition at line 210 of file atomic.hpp.