From: Sandro Santilli Date: Thu, 7 Jun 2012 15:18:08 +0000 (+0000) Subject: Register a GEOS interrupt callback to dispatch windows events X-Git-Tag: 2.1.0beta2~939 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=052941cc997974d8480a2accbb6bae195ed0f347;p=postgis Register a GEOS interrupt callback to dispatch windows events NOTE: won't build on WIN32 with GEOS-3.4.0SVN < r3672 git-svn-id: http://svn.osgeo.org/postgis/trunk@9857 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/postgis/postgis_module.c b/postgis/postgis_module.c index 121dff2ef..9599a6d2a 100644 --- a/postgis/postgis_module.c +++ b/postgis/postgis_module.c @@ -30,6 +30,15 @@ PG_MODULE_MAGIC; static pqsigfunc coreIntHandler = 0; static void handleInterrupt(int sig); +#ifdef WIN32 +#if POSTGIS_GEOS_VERSION >= 34 +static void geosInterruptCallback() { + if (UNBLOCKED_SIGNAL_QUEUE()) + pgwin32_dispatch_queued_signals(); +} +#endif +#endif + /* * Module load callback */ @@ -40,6 +49,12 @@ _PG_init(void) coreIntHandler = pqsignal(SIGINT, handleInterrupt); +#ifdef WIN32 +#if POSTGIS_GEOS_VERSION >= 34 + GEOS_interruptRegisterCallback(); +#endif +#endif + #if 0 /* Define custom GUC variables. */ DefineCustomIntVariable(