Skip to content

Commit

Permalink
workaround for multithreading locale problem in GEOS (MSVC)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex85k committed Nov 12, 2015
1 parent 68e328d commit 11b4ad4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions osmdata.cpp
Expand Up @@ -170,6 +170,10 @@ struct pending_threaded_processor : public middle_t::pending_processor {
typedef std::pair<std::shared_ptr<const middle_query_t>, 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;
Expand Down

0 comments on commit 11b4ad4

Please sign in to comment.