Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for a snapshot of the master branch, built from commit 97da996172.
PrevUpHomeNext

Macro BOOST_CONTRACT_DISABLE_THREADS

BOOST_CONTRACT_DISABLE_THREADS — Define this macro to not lock internal library data for thread safety (undefined by default).

Synopsis

// In header: <boost/contract/core/config.hpp>

BOOST_CONTRACT_DISABLE_THREADS

Description

Defining this macro will make the library implementation code not thread safe so this macro should not be defined unless the library is being used by single-threaded applications only. This library will automatically define this macro when Boost libraries are built without threads (e.g., defining BOOST_DISABLE_THREADS).

[Note] Note

When this macro is left undefined this library needs to internally use some sort of global lock (to ensure contract checking is globally disabled when other contracts are being checked and also to safely access failure handler functors). That could introduce an undesired amount of synchronization in some multi-threaded applications.

See Also:

Assertions


PrevUpHomeNext