Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 997676507D4 for ; Thu, 10 Jul 2008 19:51:57 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 33324-02 for ; Thu, 10 Jul 2008 19:51:48 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mx4.pcisys.net (mx4.pcisys.net [216.229.32.234]) by postgresql.org (Postfix) with ESMTP id EFDA0650743 for ; Thu, 10 Jul 2008 19:51:52 -0300 (ADT) Received: from [192.168.8.17] (208-45-77-115.clsp.qwest.net [208.45.77.115]) (authenticated bits=0) by mx4.pcisys.net (8.13.6/8.13.6) with ESMTP id m6AMpkgg022877 for ; Thu, 10 Jul 2008 16:51:50 -0600 (MDT) User-Agent: Microsoft-Entourage/11.3.6.070618 Date: Thu, 10 Jul 2008 16:51:45 -0600 Subject: Re: libPQ -Canceling Blocking Calls From: Keary Suska To: Postgres-Interfaces Message-ID: Thread-Topic: [INTERFACES] libPQ -Canceling Blocking Calls Thread-Index: Acji34b3xaYBdE7SEd2wjgAbY6KBOw== In-Reply-To: <14296.1215723927@sss.pgh.pa.us> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200807/6 X-Sequence-Number: 6764 7/10/08 3:05 PM, also sprach tgl@sss.pgh.pa.us: > Sure. Look at psql for an example. You probably need to call PQcancel > from a signal handler, but there's a signal-safe variant for that. Great. Although I was planning on using a threaded approach, but since libpq was compiled thread-safe, I assume this would be fine. I was hoping I could cancel a synchronous call without having to collapse the thread. This is good news. Thanks, Keary Suska Esoteritech, Inc. "Demystifying technology for your home or business"