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 Changelog]
|
||||||
|
|
||||||
|
[section unreleased]
|
||||||
|
Not yet released
|
||||||
|
|
||||||
|
* Fixed missing thread synchronization in mock::sequence
|
||||||
|
|
||||||
|
[endsect]
|
||||||
|
|
||||||
[section 1.2.7]
|
[section 1.2.7]
|
||||||
Released 25 April 2015
|
Released 25 April 2015
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
#include "../config.hpp"
|
#include "../config.hpp"
|
||||||
#include "mutex.hpp"
|
#include "mutex.hpp"
|
||||||
#include <boost/noncopyable.hpp>
|
#include <boost/noncopyable.hpp>
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/make_shared.hpp>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|
@ -23,8 +23,10 @@ namespace detail
|
||||||
class sequence_impl : private boost::noncopyable
|
class sequence_impl : private boost::noncopyable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
sequence_impl() : mutex_( boost::make_shared< mutex >() ) {}
|
sequence_impl()
|
||||||
|
: mutex_( boost::make_shared< mutex >() )
|
||||||
|
{}
|
||||||
|
|
||||||
void add( void* e )
|
void add( void* e )
|
||||||
{
|
{
|
||||||
lock _( mutex_ );
|
lock _( mutex_ );
|
||||||
|
|
@ -57,7 +59,6 @@ namespace detail
|
||||||
typedef std::vector< void* > elements_type;
|
typedef std::vector< void* > elements_type;
|
||||||
|
|
||||||
elements_type elements_;
|
elements_type elements_;
|
||||||
|
|
||||||
const boost::shared_ptr< mutex > mutex_;
|
const boost::shared_ptr< mutex > mutex_;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@
|
||||||
#define MOCK_SEQUENCE_HPP_INCLUDED
|
#define MOCK_SEQUENCE_HPP_INCLUDED
|
||||||
|
|
||||||
#include "config.hpp"
|
#include "config.hpp"
|
||||||
#include <boost/make_shared.hpp>
|
|
||||||
#include "detail/sequence_impl.hpp"
|
#include "detail/sequence_impl.hpp"
|
||||||
|
|
||||||
namespace mock
|
namespace mock
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue