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 "working" > time.sleep(1) > > def bar(): global running > time.sleep(3) > print "stopping" > running = False > > d1 = deferToThread(foo) > d2 = deferToThread(bar) > > reactor.run()
...does that make things run better? _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python