make sure to only use mutexes if THREADING=multi/MAPNIK_THREADSAFE=True
This commit is contained in:
parent
a8b147156d
commit
c5adca6e57
2 changed files with 7 additions and 1 deletions
|
@ -44,7 +44,9 @@ extern "C"
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <boost/utility.hpp>
|
#include <boost/utility.hpp>
|
||||||
#include <boost/ptr_container/ptr_vector.hpp>
|
#include <boost/ptr_container/ptr_vector.hpp>
|
||||||
|
#ifdef MAPNIK_THREADSAFE
|
||||||
#include <boost/thread/mutex.hpp>
|
#include <boost/thread/mutex.hpp>
|
||||||
|
#endif
|
||||||
|
|
||||||
// stl
|
// stl
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -315,7 +317,9 @@ namespace mapnik
|
||||||
freetype_engine();
|
freetype_engine();
|
||||||
private:
|
private:
|
||||||
FT_Library library_;
|
FT_Library library_;
|
||||||
|
#ifdef MAPNIK_THREADSAFE
|
||||||
static boost::mutex mutex_;
|
static boost::mutex mutex_;
|
||||||
|
#endif
|
||||||
static std::map<std::string,std::string> name2file_;
|
static std::map<std::string,std::string> name2file_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -36,8 +36,10 @@
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <boost/utility.hpp>
|
#include <boost/utility.hpp>
|
||||||
#include <boost/ptr_container/ptr_vector.hpp>
|
#include <boost/ptr_container/ptr_vector.hpp>
|
||||||
#include <boost/thread/mutex.hpp>
|
|
||||||
#include <boost/tuple/tuple.hpp>
|
#include <boost/tuple/tuple.hpp>
|
||||||
|
#ifdef MAPNIK_THREADSAFE
|
||||||
|
#include <boost/thread/mutex.hpp>
|
||||||
|
#endif
|
||||||
|
|
||||||
//stl
|
//stl
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
Loading…
Add table
Reference in a new issue