mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Added thread-safety
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@730 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
parent
f1580c95cc
commit
086a42e432
15 changed files with 464 additions and 12 deletions
|
|
@ -144,4 +144,14 @@ The policy can then be activated by defining MOCK_ERROR_POLICY prior to includin
|
|||
|
||||
[endsect]
|
||||
|
||||
[section Thread safety]
|
||||
|
||||
Thread safety is not activated by default however defining MOCK_THREAD_SAFE before including the library will make creations and calls to mock objects thread-safe :
|
||||
|
||||
[thread_safe]
|
||||
|
||||
If available the library will rely on the C++11 standard mutexes and locks, otherwise Boost.Thread will be used.
|
||||
|
||||
[endsect]
|
||||
|
||||
[endsect]
|
||||
|
|
|
|||
|
|
@ -171,3 +171,8 @@ struct custom_policy
|
|||
#define MOCK_ERROR_POLICY custom_policy
|
||||
#include <turtle/mock.hpp>
|
||||
//]
|
||||
|
||||
//[ thread_safe
|
||||
#define MOCK_THREAD_SAFE
|
||||
#include <turtle/mock.hpp>
|
||||
//]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue