Ok, here's the patch for the cancel() feature with one test added to
03smethod.t (so that the assertion at the top of that test file would remain
true).  I tried to think of other ways cancel() could be tested, but there
just isn't any.  It is useful when another database handle is holding a lock
on a table/row, which I demonstrated in the test (when you call cancel() on
a statement handle that isn't blocking, it is just a no-op, so there's no
purpose in testing that either).

Just a heads-up, I had to 'use POSIX' in 03smethod.t as that is the only way
to reliably handle signals (DBI's doc even suggests this at the bottom of
its "Signal Handling and Canceling Operations" section).

-- 
Eric Simon
The IQ Group, Inc.


-----Original Message-----
From: David E. Wheeler [mailto:[email protected]] 
Sent: Tuesday, November 16, 2010 5:05 PM
To: Eric Simon
Cc: [email protected]
Subject: Re: Any DBD::Pg Committers out there?

On Nov 16, 2010, at 3:01 PM, Eric Simon wrote:

> I also patched the 04misc test because it was failing under Perl 5.12.  If
> you'd like me to break that out into a separate patch, let me know.

Yeah, that'd be great.

As for the cancel bit:

* I can't speak to the implementation, as I don't know XS at all. Can anyone
else have a look at comment?

* Would you mind adding some tests for the new feature?

Thanks,

David

Attachment: dbd-pg-cancel.patch
Description: Binary data

Reply via email to