[Twisted-Python] stopFactory() called twice

Nicholas Piper nick-twisted at nickpiper.co.uk
Tue Apr 9 14:14:10 EDT 2002

radix suggested I report this to the mailing list. It happens both
with CVS and 0.16.0

Example output from my program is:

(own == one wire network)

nicholas at piamox7:~/projects/twisted/Twisted$ python play.py       
Enabling Multithreading. 
play.onewireprotocolfactory starting on 8007
Creating own             ## This line from startFactory(self):
Gained Holder Nicholas     ## from the ownthread
Starting shutdown sequence. # I pressed Ctrl-C
Stopping main loop. 
Main loop terminated .
(Port 8007 Closed) 
stopFactory() called      
own thread finished     #stopFactory() sets a variable on ownthread to
                        # notify it to finish up, then waits a few seconds
deleting self.own      # shouldn't hang around in the tap, so I delete
                       # it in stopFactory
Saving OWN application to OWN-shutdown.tap...
stopFactory() called    # what, again ?
stopFactory() has been called for the second time! # yes, really again!
play.onewireprotocolfactory starting on 8007   # eh ?
Creating own                           # it's started it all up again!
Gained Holder Nicholas        ## from the ownthread

My code is very messy and bad probably :-) and my threads are probably
quite dangerous. It can be found at
www.nickpiper.co.uk/ibutton/play.py for the next few days.


Part 3 MEng Cybernetics; Reading, UK       http://www.nickpiper.co.uk/
GPG Encrypted mail welcome!                             1024D/3ED8B27F
Choose life. Be Vegan :-) Please reduce needless cruelty + suffering !

More information about the Twisted-Python mailing list