What is the best way to control Twisted's reactor so that it is nonblocking?
问题 Instead of running reactor.run(), I'd like to call something else (I dunno, like reactor.runOnce() or something) occasionally while maintaining my own main loop. Is there a best-practice for this with twisted? 回答1: Yes. The best practice is that this is a bad idea, and that you never really need to do it. It doesn't work with all reactors, and you certainly can't have two different libraries which want to do this. Why do you need to maintain your own main loop? Chances are, it's something