Re: libPQ -Canceling Blocking Calls

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Keary Suska <hierophant(at)pcisys(dot)net>
Cc: Postgres-Interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: libPQ -Canceling Blocking Calls
Date: 2008-07-10 21:05:27
Message-ID: 14296.1215723927@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Keary Suska <hierophant(at)pcisys(dot)net> writes:
> Is it possible to use PQcancel() to cancel a blocking call, such as a call
> to PQexec?

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.

regards, tom lane

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Keary Suska 2008-07-10 22:51:45 Re: libPQ -Canceling Blocking Calls
Previous Message Keary Suska 2008-07-10 20:09:03 libPQ -Canceling Blocking Calls