Re: [cx-oracle-users] Re: Connection timeout
Brought to you by:
atuining
From: Anthony T. <an...@co...> - 2004-03-17 22:06:21
|
On Wed, 2004-03-17 at 14:11, Paul Moore wrote: > Anthony Tuininga <an...@co...> writes: > > > There is no way in the OCI that I am aware of for dealing with timeouts. > > [...] > > > The only other option (that I can think of) is to use threads or > > processes and a timer to implement your own timeout of some sort -- > > not a very palatable option, though. :-) > > Thanks for the information. I was afraid that was the case. Threads is > a possibility (I'm running 50 or more connect attempts in separate > threads, so adding a control thread isn't much of a problem). But that > still leaves the question - if thread A is sitting in a connect() > call, can I, from thread B, make it stop? (Given that Python offers no > way to kill a thread from "outside"). No. The connect attempt will simply continue and fail (or succeed) whenever it gets around to it. Its just that the program no longer cares about the result. :-) Oracle provides a method for canceling statement executions (on all platforms except Windows) but nothing for making connections. That's just the way it is, unfortunately. > Thanks, > Paul. -- Anthony Tuininga an...@co... Computronix Distinctive Software. Real People. Suite 200, 10216 - 124 Street NW Edmonton, AB, Canada T5N 4A3 Phone: (780) 454-3700 Fax: (780) 454-3838 http://www.computronix.com |