Skip to content

Commit

Permalink
Revert "avoid mutex locks on pj_transform for proj 4.7 and above - cl…
Browse files Browse the repository at this point in the history
…oses mapnik#1072"

This reverts commit 150c9f8.
  • Loading branch information
Dane Springmeyer committed Mar 24, 2012
1 parent 19f43c9 commit 0be7d66
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
6 changes: 2 additions & 4 deletions src/proj_transform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ bool proj_transform::forward (double * x, double * y , double * z, int point_cou
}

do {
// https://github.com/mapnik/mapnik/issues/1072
#if defined(MAPNIK_THREADSAFE) && PJ_VERSION < 470
#if defined(MAPNIK_THREADSAFE) && PJ_VERSION < 480
mutex::scoped_lock lock(projection::mutex_);
#endif
if (pj_transform( source_.proj_, dest_.proj_, point_count,
Expand Down Expand Up @@ -153,8 +152,7 @@ bool proj_transform::backward (double * x, double * y , double * z, int point_co
}

do {
// https://github.com/mapnik/mapnik/issues/1072
#if defined(MAPNIK_THREADSAFE) && PJ_VERSION < 470
#if defined(MAPNIK_THREADSAFE) && PJ_VERSION < 480
mutex::scoped_lock lock(projection::mutex_);
#endif

Expand Down
10 changes: 5 additions & 5 deletions src/projection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

namespace mapnik {

#if defined(MAPNIK_THREADSAFE) && PJ_VERSION < 470
#if defined(MAPNIK_THREADSAFE) && PJ_VERSION < 480
boost::mutex projection::mutex_;
#endif

Expand Down Expand Up @@ -84,7 +84,7 @@ std::string const& projection::params() const

void projection::forward(double & x, double &y ) const
{
#if defined(MAPNIK_THREADSAFE) && PJ_VERSION < 470
#if defined(MAPNIK_THREADSAFE) && PJ_VERSION < 480
mutex::scoped_lock lock(mutex_);
#endif
projUV p;
Expand All @@ -102,7 +102,7 @@ void projection::forward(double & x, double &y ) const

void projection::inverse(double & x,double & y) const
{
#if defined(MAPNIK_THREADSAFE) && PJ_VERSION < 470
#if defined(MAPNIK_THREADSAFE) && PJ_VERSION < 480
mutex::scoped_lock lock(mutex_);
#endif
if (is_geographic_)
Expand All @@ -120,7 +120,7 @@ void projection::inverse(double & x,double & y) const

projection::~projection()
{
#if defined(MAPNIK_THREADSAFE) && PJ_VERSION < 470
#if defined(MAPNIK_THREADSAFE) && PJ_VERSION < 480
mutex::scoped_lock lock(mutex_);
#endif
if (proj_) pj_free(proj_);
Expand All @@ -131,7 +131,7 @@ projection::~projection()

void projection::init()
{
#if defined(MAPNIK_THREADSAFE) && PJ_VERSION < 470
#if defined(MAPNIK_THREADSAFE) && PJ_VERSION < 480
mutex::scoped_lock lock(mutex_);
#endif
#if PJ_VERSION >= 480
Expand Down

0 comments on commit 0be7d66

Please sign in to comment.