Thank you for your instruct! I am a new people in twisted,so I still have another problem. If i transfer a lot of data(a big file),program will hang when transmission finished. If transfering a few words ,program will give me another chance to input. what's the reason about this?
> -----Original E-mail----- > From: exar...@twistedmatrix.com > Sent Time: 2009-9-19 0:21:17 > To: "Twisted general discussion" <twisted-python@twistedmatrix.com> > Cc: > Subject: Re: [Twisted-Python] What is the difference in between reactor.running and reactor._stopped > > On 02:23 pm, gabriel.rosse...@arimaz.com wrote: > >Hello, > > > >I tried using reactor.running for a test, to not try to stop the > >reactor > >if it's already stopped, but it doesn't work. If I use reactor._stopped > >instead, it works. I know I'm not supposed to access it sonce it is > >prefixed by the underscore, so my question is what is the difference in > >between reactor.running and reactor._stopped, and why does > >reactor.running not work as I expect (not reactor.running == > >reactor._stopped)? > > reactor.running is really only provided for backwards compatibility. It > was never intended to be public. It has bizarre semantics which you can > read about in its unit tests: > > http://twistedmatrix.com/trac/browser/trunk/twisted/internet/test/test_core.py > > What you would almost certainly rather do is change your code not to > rely on it. Why do you find yourself needing to ask the reactor if you > have previously asked it to stop? Generally, your code should be able > to keep track of that itself. > > Jean-Paul > > _______________________________________________ > Twisted-Python mailing list > Twisted-Python@twistedmatrix.com > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python