[geos-commits] r4030 - trunk/src/geomgraph/index
svn_geos at osgeo.org
svn_geos at osgeo.org
Mon Nov 10 01:57:52 PST 2014
Author: strk
Date: 2014-11-10 01:57:52 -0800 (Mon, 10 Nov 2014)
New Revision: 4030
Modified:
trunk/src/geomgraph/index/SimpleMCSweepLineIntersector.cpp
Log:
Make RelateComputer interruptible (#711)
Injects interruptibility calls in SimpleMCSweepLineIntersector
Funded by CartoDB
Modified: trunk/src/geomgraph/index/SimpleMCSweepLineIntersector.cpp
===================================================================
--- trunk/src/geomgraph/index/SimpleMCSweepLineIntersector.cpp 2014-11-10 09:33:01 UTC (rev 4029)
+++ trunk/src/geomgraph/index/SimpleMCSweepLineIntersector.cpp 2014-11-10 09:57:52 UTC (rev 4030)
@@ -21,6 +21,7 @@
#include <geos/geomgraph/index/MonotoneChain.h>
#include <geos/geomgraph/index/SweepLineEvent.h>
#include <geos/geomgraph/Edge.h>
+#include <geos/util/Interrupt.h>
using namespace std;
@@ -93,6 +94,7 @@
events.reserve(events.size()+(n*2));
for(size_t i=0; i<n; ++i)
{
+ GEOS_CHECK_FOR_INTERRUPTS();
MonotoneChain *mc=new MonotoneChain(mce,i);
SweepLineEvent *insertEvent=new SweepLineEvent(edgeSet,mce->getMinX(i),NULL,mc);
events.push_back(insertEvent);
@@ -111,6 +113,7 @@
sort(events.begin(), events.end(), SweepLineEventLessThen());
for(size_t i=0; i<events.size(); ++i)
{
+ GEOS_CHECK_FOR_INTERRUPTS();
SweepLineEvent *ev=events[i];
if (ev->isDelete())
{
@@ -126,6 +129,7 @@
prepareEvents();
for(size_t i=0; i<events.size(); ++i)
{
+ GEOS_CHECK_FOR_INTERRUPTS();
SweepLineEvent *ev=events[i];
if (ev->isInsert())
{
More information about the geos-commits
mailing list