Skip to content

Commit 427fc78

Browse files
committed
use c++11 thread_local specifier (remove boost::thread_specific_ptr)
1 parent 60eeb5a commit 427fc78

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/mapnik_python.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ using mapnik::python_unblock_auto_block;
190190
#ifdef MAPNIK_DEBUG
191191
bool python_thread::thread_support = true;
192192
#endif
193-
boost::thread_specific_ptr<PyThreadState> python_thread::state;
193+
thread_local std::unique_ptr<PyThreadState> python_thread::state;
194194

195195
struct agg_renderer_visitor_1
196196
{

src/mapnik_threads.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#ifndef MAPNIK_THREADS_HPP
2323
#define MAPNIK_THREADS_HPP
2424

25-
#include <boost/thread/tss.hpp> // for thread_specific_ptr
25+
#include <thread>
2626
#include <Python.h>
2727

2828
namespace mapnik {
@@ -70,7 +70,7 @@ class python_thread
7070
}
7171

7272
private:
73-
static boost::thread_specific_ptr<PyThreadState> state;
73+
static thread_local std::unique_ptr<PyThreadState> state;
7474
#ifdef MAPNIK_DEBUG
7575
static bool thread_support;
7676
#endif

0 commit comments

Comments
 (0)