From 45c9078959ede12820f266c859bc1fb96e9b9d6f Mon Sep 17 00:00:00 2001 From: Tim Hatch Date: Mon, 30 Dec 2024 03:21:28 -0800 Subject: [PATCH] Mark Construct nogil so it can operate in parallel --- pyvoronoi/pyvoronoi.pyx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyvoronoi/pyvoronoi.pyx b/pyvoronoi/pyvoronoi.pyx index 894df89..442dfa8 100644 --- a/pyvoronoi/pyvoronoi.pyx +++ b/pyvoronoi/pyvoronoi.pyx @@ -94,7 +94,7 @@ cdef extern from "voronoi.hpp": VoronoiDiagram() void AddPoint(Point p) void AddSegment(Segment s) - void Construct() + void Construct() nogil vector[Point] GetPoints() vector[Segment] GetSegments() @@ -268,8 +268,8 @@ cdef class Pyvoronoi: raise VoronoiException('Construct() has already been called') self.constructed = 1 - - self.thisptr.Construct() + with nogil: + self.thisptr.Construct() self.thisptr.MapVertexIndexes() self.thisptr.MapEdgeIndexes()