use mutex from base class

This commit is contained in:
Artem Pavlenko 2011-11-18 09:39:57 +00:00
parent 3520033b0d
commit 771a8ad72f
6 changed files with 1 additions and 33 deletions

View file

@ -29,13 +29,8 @@
#include <mapnik/plugin.hpp>
#include <mapnik/datasource.hpp>
#include <boost/utility.hpp>
#ifdef MAPNIK_THREADSAFE
#include <boost/thread/mutex.hpp>
#endif
// boost
#include <boost/utility.hpp>
#include <boost/shared_ptr.hpp>
// stl
@ -56,9 +51,6 @@ private:
static bool registered_;
static bool insert(const std::string& name,const lt_dlhandle module);
static std::vector<std::string> plugin_directories_;
#ifdef MAPNIK_THREADSAFE
static boost::mutex mutex_;
#endif
public:
static std::vector<std::string> plugin_names();
static std::string plugin_directories();

View file

@ -33,9 +33,6 @@
#include <boost/interprocess/mapped_region.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/optional.hpp>
#ifdef MAPNIK_THREADSAFE
#include <boost/thread/mutex.hpp>
#endif
namespace mapnik
{
@ -49,9 +46,6 @@ struct MAPNIK_DECL mapped_memory_cache :
private boost::noncopyable
{
friend class CreateStatic<mapped_memory_cache>;
#ifdef MAPNIK_THREADSAFE
static boost::mutex mutex_;
#endif
static boost::unordered_map<std::string,mapped_region_ptr> cache_;
static bool insert(std::string const& key, mapped_region_ptr);
static boost::optional<mapped_region_ptr> find(std::string const& key, bool update_cache = false);

View file

@ -39,9 +39,6 @@
#include <boost/unordered_map.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/optional.hpp>
#ifdef MAPNIK_THREADSAFE
#include <boost/thread/mutex.hpp>
#endif
namespace mapnik
{
@ -57,9 +54,6 @@ struct MAPNIK_DECL marker_cache :
{
friend class CreateStatic<marker_cache>;
#ifdef MAPNIK_THREADSAFE
static boost::mutex mutex_;
#endif
static boost::unordered_map<std::string,marker_ptr> cache_;
static bool insert(std::string const& key, marker_ptr);
static boost::optional<marker_ptr> find(std::string const& key, bool update_cache = false);

View file

@ -244,8 +244,4 @@ void datasource_cache::register_datasources(const std::string& str)
}
}
#ifdef MAPNIK_THREADSAFE
boost::mutex datasource_cache::mutex_;
#endif
}

View file

@ -85,8 +85,4 @@ boost::optional<mapped_region_ptr> mapped_memory_cache::find(std::string const&
return result;
}
#ifdef MAPNIK_THREADSAFE
boost::mutex mapped_memory_cache::mutex_;
#endif
}

View file

@ -131,8 +131,4 @@ boost::optional<marker_ptr> marker_cache::find(std::string const& uri, bool upda
return result;
}
#ifdef MAPNIK_THREADSAFE
boost::mutex marker_cache::mutex_;
#endif
}