From: Sandro Santilli Date: Tue, 21 Oct 2014 14:51:51 +0000 (+0000) Subject: Add a method to cancel interruption requests in liblwgeom X-Git-Tag: 2.2.0rc1~754 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ded422b8afb3f8ba4f4a0e05318e964a66903caf;p=postgis Add a method to cancel interruption requests in liblwgeom git-svn-id: http://svn.osgeo.org/postgis/trunk@13101 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/liblwgeom/liblwgeom.h.in b/liblwgeom/liblwgeom.h.in index f3da1c473..f756f0a98 100644 --- a/liblwgeom/liblwgeom.h.in +++ b/liblwgeom/liblwgeom.h.in @@ -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 diff --git a/liblwgeom/lwgeom_api.c b/liblwgeom/lwgeom_api.c index 7ae2a9c75..deadea34a 100644 --- a/liblwgeom/lwgeom_api.c +++ b/liblwgeom/lwgeom_api.c @@ -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 *