Skip to Content.
Sympa Menu

freetds - Re: [freetds] Cancellation

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Alex Kiesel <alex.kiesel AT document-root.de>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Cancellation
  • Date: Sun, 08 Feb 2004 12:47:50 +0100

On Fri, 2004-02-06 at 16:48, ZIGLIO, Frediano, VF-IT wrote:
> New idea is:
> - if state is idle ignore cancel request (tds_process_cancel should just
> return on idle)
> - if state is not idle cancel set a flag (send_cancel or whatever)
> - on tds_write_packet test for cancel flag and send cancel (setting
> cancel state too), so querying/processing automatically send cancel
> - updating state (ie from QUERYING to PROCESSING) test state (it
> shouldn't be CANCEL)
> This method seems less intrusive and simpler to implement.

Hi,

I consider setting a flag for cancel and checking this flag at exactly
one point in the code as a good thing. Using an additional state is
problematic because the state is being checked at many places. When
dealing with interrupts we must keep in mind that the state can be
changed from outside of the current "processing flow".

But why do you want to have tds_write_packet() check the flag instead of
tds_read_packet()? When retrieving results from the server, is there a
place where tds_write_packet() is being called? If not, FreeTDS would
never send the cancel until the whole result have been read.

Cheers,
-Alex






Archive powered by MHonArc 2.6.24.

Top of Page