From 14fa35fb18d367ec58cd56dee8ebc8f207062d6c Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Sat, 10 Jan 2009 23:30:33 +0000 Subject: [PATCH] + enable multiple python threads with Cairo rennderer patch from jonb --- bindings/python/mapnik_python.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bindings/python/mapnik_python.cpp b/bindings/python/mapnik_python.cpp index cb89c1481..fc20381e1 100644 --- a/bindings/python/mapnik_python.cpp +++ b/bindings/python/mapnik_python.cpp @@ -91,16 +91,20 @@ void render2(const mapnik::Map& map,mapnik::Image32& image) void render3(const mapnik::Map& map,PycairoSurface* surface, unsigned offset_x = 0, unsigned offset_y = 0) { + Py_BEGIN_ALLOW_THREADS Cairo::RefPtr s(new Cairo::Surface(surface->surface)); mapnik::cairo_renderer ren(map,s,offset_x, offset_y); ren.apply(); + Py_END_ALLOW_THREADS } void render4(const mapnik::Map& map,PycairoSurface* surface) { + Py_BEGIN_ALLOW_THREADS Cairo::RefPtr s(new Cairo::Surface(surface->surface)); mapnik::cairo_renderer ren(map,s); ren.apply(); + Py_END_ALLOW_THREADS } #endif