Add a method to cancel interruption requests in liblwgeom
authorSandro Santilli <strk@keybit.net>
Tue, 21 Oct 2014 14:51:51 +0000 (14:51 +0000)
committerSandro Santilli <strk@keybit.net>
Tue, 21 Oct 2014 14:51:51 +0000 (14:51 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@13101 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/liblwgeom.h.in
liblwgeom/lwgeom_api.c

index f3da1c4730b0e737878e84adf5347b2be482856d..f756f0a98541ef931f5e08a6a18238f738fc2b85 100644 (file)
@@ -203,6 +203,11 @@ extern void lwgeom_set_handlers(lwallocator allocator,
  */
 extern void lwgeom_request_interrupt(void);
 
+/**
+ * Cancel any interruption request
+ */
+extern void lwgeom_cancel_interrupt(void);
+
 /**
  * Install a callback to be called periodically during
  * algorithm execution. Mostly only needed on WIN32 to
index 7ae2a9c75e93f89993ccac043c65f972bfff682c..deadea34a4e476a9ec71c36b8ac15d4438325e81 100644 (file)
@@ -767,6 +767,10 @@ void
 lwgeom_request_interrupt() {
   _lwgeom_interrupt_requested = 1;
 }
+void
+lwgeom_cancel_interrupt() {
+  _lwgeom_interrupt_requested = 0;
+}
 
 lwinterrupt_callback *_lwgeom_interrupt_callback = 0;
 lwinterrupt_callback *