mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
commit
8c1e36ed96
3 changed files with 12 additions and 5 deletions
|
|
@ -7,6 +7,13 @@
|
|||
|
||||
[section Changelog]
|
||||
|
||||
[section unreleased]
|
||||
Not yet released
|
||||
|
||||
* Fixed missing thread synchronization in mock::sequence
|
||||
|
||||
[endsect]
|
||||
|
||||
[section 1.2.7]
|
||||
Released 25 April 2015
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
#include "../config.hpp"
|
||||
#include "mutex.hpp"
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/make_shared.hpp>
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
|
|
@ -23,8 +23,10 @@ namespace detail
|
|||
class sequence_impl : private boost::noncopyable
|
||||
{
|
||||
public:
|
||||
sequence_impl() : mutex_( boost::make_shared< mutex >() ) {}
|
||||
|
||||
sequence_impl()
|
||||
: mutex_( boost::make_shared< mutex >() )
|
||||
{}
|
||||
|
||||
void add( void* e )
|
||||
{
|
||||
lock _( mutex_ );
|
||||
|
|
@ -57,7 +59,6 @@ namespace detail
|
|||
typedef std::vector< void* > elements_type;
|
||||
|
||||
elements_type elements_;
|
||||
|
||||
const boost::shared_ptr< mutex > mutex_;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
#define MOCK_SEQUENCE_HPP_INCLUDED
|
||||
|
||||
#include "config.hpp"
|
||||
#include <boost/make_shared.hpp>
|
||||
#include "detail/sequence_impl.hpp"
|
||||
|
||||
namespace mock
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue