Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #37723 > unrolled thread

Re: Cancel threads after timeout

Started byJason Friedman <jsf80238@gmail.com>
First post2013-01-26 08:43 -0700
Last post2013-01-26 08:43 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Cancel threads after timeout Jason Friedman <jsf80238@gmail.com> - 2013-01-26 08:43 -0700

#37723 — Re: Cancel threads after timeout

FromJason Friedman <jsf80238@gmail.com>
Date2013-01-26 08:43 -0700
SubjectRe: Cancel threads after timeout
Message-ID<mailman.1080.1359215014.2939.python-list@python.org>
> Sometimes it happens that a query on one of the database servers
> takes longer than expected and impedes the generation of this report
> (that's right, the queries are ran sequential). What I am trying to
> achieve is to parallelize the queries on each database server and to be
> able to cancel one of them if it takes longer than X minutes.

Only answering a small portion of your question ....
Assuming you are able to figure out how to "cancel" a thread or
process on your side, it is possible the database itself will not
respect that.  In other words, if you execute "SELECT ..." singly,
outside of Python, and type CNTL-C, does your database quickly
recognize you are no longer interested in the result set and stop its
work?

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web