Re: [Twisted-Python] Exit all threads upon KeyboardInterrupt

2014-01-14 Thread Dustin J. Mitchell
You're absolutely right. I wasn't arguing with you, but with JP :) Dustin On Tue, Jan 14, 2014 at 2:06 PM, Glyph Lefkowitz wrote: > On Jan 14, 2014, at 6:27 AM, Dustin J. Mitchell wrote: > > Second, this has nothing whatsoever to do with whether the I/O is > blocking or not. Twisted apps can

Re: [Twisted-Python] Exit all threads upon KeyboardInterrupt

2014-01-14 Thread Glyph Lefkowitz
On Jan 14, 2014, at 6:27 AM, Dustin J. Mitchell wrote: > Second, this has nothing whatsoever to do with whether the I/O is > blocking or not. Twisted apps can and, believe me from experience, do > suffer from stuck TCP connections. Sure, the wasted resources in this > case are smaller (just a f

Re: [Twisted-Python] Exit all threads upon KeyboardInterrupt

2014-01-14 Thread Phil Mayers
On 14/01/14 15:10, Dustin J. Mitchell wrote: On Tue, Jan 14, 2014 at 10:05 AM, Phil Mayers wrote: I'm wondering if TCP keepalive isn't any use to you in this regard? It is, but only in cases where we can tweak kernel parameters appropriately so that the timeout is not >2h. Hmm. I see Twiste

Re: [Twisted-Python] Exit all threads upon KeyboardInterrupt

2014-01-14 Thread Dustin J. Mitchell
On Tue, Jan 14, 2014 at 10:05 AM, Phil Mayers wrote: > I'm wondering if TCP keepalive isn't any use to you in this regard? It is, but only in cases where we can tweak kernel parameters appropriately so that the timeout is not >2h. > (and what do Mozilla do with Twisted? :o) Buildbot, among othe

Re: [Twisted-Python] Exit all threads upon KeyboardInterrupt

2014-01-14 Thread Phil Mayers
On 14/01/14 14:27, Dustin J. Mitchell wrote: There are two things wrong with your scenario. First, in any production or production-ready environment, your software needs to correctly handle stuck TCP connections. With the proliferation of "smart" network equipment (session-tracking firewalls, e

Re: [Twisted-Python] Exit all threads upon KeyboardInterrupt

2014-01-14 Thread Dustin J. Mitchell
There are two things wrong with your scenario. First, in any production or production-ready environment, your software needs to correctly handle stuck TCP connections. With the proliferation of "smart" network equipment (session-tracking firewalls, etc.), this is much more common than it was five

Re: [Twisted-Python] Exit all threads upon KeyboardInterrupt

2014-01-14 Thread exarkun
On 13 Jan, 11:31 pm, gl...@twistedmatrix.com wrote: On Jan 12, 2014, at 4:42 PM, johnnadre wrote: On Sun, 12 Jan 2014 14:03:24 -0800 wrote On 09:01 pm, johnna...@zoho.com wrote: Hi, I want to exit my application immediately when CTRL+C is pressed, however reactor hangs when th

Re: [Twisted-Python] Exit all threads upon KeyboardInterrupt

2014-01-13 Thread Glyph Lefkowitz
On Jan 12, 2014, at 4:42 PM, johnnadre wrote: > > On Sun, 12 Jan 2014 14:03:24 -0800 wrote > > >> On 09:01 pm, johnna...@zoho.com wrote: >>> >>> Hi, >>> >>> I want to exit my application immediately when CTRL+C is pressed, >>> however reactor hangs when there are running thr

Re: [Twisted-Python] Exit all threads upon KeyboardInterrupt

2014-01-12 Thread johnnadre
On Sun, 12 Jan 2014 14:03:24 -0800 wrote > On 09:01 pm, johnna...@zoho.com wrote: > > > >Hi, > > > >I want to exit my application immediately when CTRL+C is pressed, > >however reactor hangs when there are running threads. > >Some of these threads have blocking I/O, so I

Re: [Twisted-Python] Exit all threads upon KeyboardInterrupt

2014-01-12 Thread exarkun
On 09:01 pm, johnna...@zoho.com wrote: Hi, I want to exit my application immediately when CTRL+C is pressed, however reactor hangs when there are running threads. Some of these threads have blocking I/O, so I can't simply set a variable or wait for them to terminate. An example application wo

[Twisted-Python] Exit all threads upon KeyboardInterrupt

2014-01-12 Thread johnnadre
Hi, I want to exit my application immediately when CTRL+C is pressed, however reactor hangs when there are running threads. Some of these threads have blocking I/O, so I can't simply set a variable or wait for them to terminate. An example application would be: from twisted.internet import rea