From 11b4ad4b42b9aa713c78d3f198cd102b573ef2cd Mon Sep 17 00:00:00 2001 From: alex85k Date: Thu, 12 Nov 2015 20:18:48 +0500 Subject: [PATCH] workaround for multithreading locale problem in GEOS (MSVC) --- osmdata.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/osmdata.cpp b/osmdata.cpp index 5456555f6..4c66eb195 100644 --- a/osmdata.cpp +++ b/osmdata.cpp @@ -170,6 +170,10 @@ struct pending_threaded_processor : public middle_t::pending_processor { typedef std::pair, output_vec_t> clone_t; static void do_jobs(output_vec_t const& outputs, pending_queue_t& queue, size_t& ids_done, std::mutex& mutex, int append, bool ways) { +#ifdef _MSC_VER + // Avoid problems when GEOS WKT-related methods switch the locale + _configthreadlocale(_ENABLE_PER_THREAD_LOCALE); +#endif while (true) { //get the job off the queue synchronously pending_job_t job;