![]() |
Home | Libraries | People | FAQ | More |
BOOST_CONTRACT_DISABLE_THREADS — Define this macro to not lock internal library data for thread safety (undefined by default).
// In header: <boost/contract/core/config.hpp>
BOOST_CONTRACT_DISABLE_THREADS
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 |
---|---|
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: