make sure to only use mutexes if THREADING=multi/MAPNIK_THREADSAFE=True

This commit is contained in:
Dane Springmeyer 2010-07-14 01:28:04 +00:00
parent a8b147156d
commit c5adca6e57
2 changed files with 7 additions and 1 deletions

View file

@ -44,7 +44,9 @@ extern "C"
#include <boost/shared_ptr.hpp>
#include <boost/utility.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
#ifdef MAPNIK_THREADSAFE
#include <boost/thread/mutex.hpp>
#endif
// stl
#include <string>
@ -315,7 +317,9 @@ namespace mapnik
freetype_engine();
private:
FT_Library library_;
#ifdef MAPNIK_THREADSAFE
static boost::mutex mutex_;
#endif
static std::map<std::string,std::string> name2file_;
};

View file

@ -36,8 +36,10 @@
#include <boost/shared_ptr.hpp>
#include <boost/utility.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/tuple/tuple.hpp>
#ifdef MAPNIK_THREADSAFE
#include <boost/thread/mutex.hpp>
#endif
//stl
#include <string>