Re: [Twisted-Python] SerialPort.loseConnection() BUG

2009-06-10 Thread glyph
On 10 Jun, 12:23 pm, exar...@divmod.com wrote: >Please don't top-post. Since I'm seeing more and more messages where someone is top-posting, I think it might be helpful if we sent a more specific example of a positive example of what replies are expected to look like. I think for now it might

[Twisted-Python] Need working examples of imap4 client.

2009-06-10 Thread Pywinder Singh
Can someone point me to a working example of imap4 client? I've tried the example off the site, code from Abe Fettig's book, and every example I could find on the web. (most of them seem outdated, as do most discussions I've found on the subject) All of them invariably end with: twisted.internet

Re: [Twisted-Python] stop conditions and deferToThread()

2009-06-10 Thread Jean-Paul Calderone
On Wed, 10 Jun 2009 12:04:16 +0200, Thomas Jakobsen wrote: >Hi > >As discussed in a previous thread > > http://twistedmatrix.com/pipermail/twisted-python/2009-May/019717.html > >a task put in its own thread via deferToThread() won't stop even >though the reactor has stopped. It has to carry out

Re: [Twisted-Python] SerialPort.loseConnection() BUG

2009-06-10 Thread Jean-Paul Calderone
On Wed, 10 Jun 2009 11:20:15 +0800, biziap biziap wrote: Please don't top-post. >Maybe you can try to call transport.flushInput(), transport.flushOutput() >before loseConnection(). > No, this is wrong. Do not call these methods, ever. > >2009/6/9 Nestor A. Diaz : >> Hello, there is a bug on t

Re: [Twisted-Python] stop conditions and deferToThread()

2009-06-10 Thread Tim Allen
I'm not sure this is the problem you're facing, but... On Wed, Jun 10, 2009 at 12:04:16PM +0200, Thomas Jakobsen wrote: > import time > from twisted.internet import reactor > from twisted.internet.threads import deferToThread > > running = True > > def foo(): >while running: >print "

Re: [Twisted-Python] stop conditions and deferToThread()

2009-06-10 Thread Phil Mayers
Thomas Jakobsen wrote: > Hi > > As discussed in a previous thread > >http://twistedmatrix.com/pipermail/twisted-python/2009-May/019717.html > > a task put in its own thread via deferToThread() won't stop even > though the reactor has stopped. It has to carry out its own check that > the reac

[Twisted-Python] stop conditions and deferToThread()

2009-06-10 Thread Thomas Jakobsen
Hi As discussed in a previous thread http://twistedmatrix.com/pipermail/twisted-python/2009-May/019717.html a task put in its own thread via deferToThread() won't stop even though the reactor has stopped. It has to carry out its own check that the reactor is running and stop if that is not th

Re: [Twisted-Python] Application Design help - Concurrent but not Protocols based.

2009-06-10 Thread Senthil Kumaran
On Wed, Jun 03, 2009 at 02:55:47PM -0400, John Santos wrote: > > This is not an issue specifically related to Python or Twisted, but > there is a very serious synchronization issue that needs to be > addressed with this application design. (Trust me, I've seen this > issue come up dozens of times

Re: [Twisted-Python] Application Design help - Concurrent but not Protocols based.

2009-06-10 Thread Senthil Kumaran
On Wed, Jun 03, 2009 at 10:43:34AM -0700, Minesh Patel wrote: > For this, since your data is huge and seems like it will need a lot of > CPU utilization, you might have to deferToThread, since Twisted runs > in a single thread and will block AFAIK. > > d = threads.deferToThread(do_a, arg1_to_do_a