[Twisted-Python] Second try at reporting gtk reactor problem
Hello, since nobody actually responding with a useful message regarding my report, I'm reposting an extremely simple (1 page) example which exhibits the behavior. My example creates a gtkreactor and runs it. A small reporter class is run from a second thread. Under the gtk reactor, the log messages from the second thread are not reported in a timely fashion (only once per second or so). From my understanding the messages should be printed more frequently (about once every 1/10th second). This does work under the wx and plain reactors, so I suspect there is a defect in the gtk reactor. I would simply like to get a confirmation that my example is a valid one, that the results I expect are valid, and that other people can reproduce my experience. If that is the case then I will submit a formal bug report. All of this should be reproducible using Twisted 1.2.0. Things get even weirder if you remove the logging support and replace it with all print statements. import time, sys from twisted.internet import gtk2reactor gtk2reactor.install() from twisted.python import threadable threadable.init() from twisted.internet import reactor from twisted.python import log log.startLogging(sys.stdout) class TestThingy: def __init__(self): print "TestThingy created" def run(self): print "TestThingy run" for i in range(10): print "TestThingy message" time.sleep(0.1) print "TestThingy done" class ThingyManager: def __init__(self): pass def submitThingy(self): log.err("ThingyManager submitting") f = TestThingy() log.err("ThingyManager created") reactor.callInThread(f.run) log.err("ThingyManager calledInThread") def ticker(*args): log.err("ticker: %d" % time.time()) reactor.callLater(1, ticker) t = ThingyManager() reactor.callLater(0, ticker) reactor.callLater(3, t.submitThingy) reactor.run() log.err("Reactor done")
David E. Konerding wrote:
Hello, since nobody actually responding with a useful message regarding my report, I'm reposting an extremely simple (1 page) example which exhibits the behavior.
Hmm, I don't see anything about the gtkreactor on the bug tracker. http://twistedmatrix.com/bugs/ Please attach your example to the report you make. -- Twisted | Christopher Armstrong: International Man of Twistery Radix | Release Manager, Twisted Project ---------+ http://radix.twistedmatrix.com/
Christopher Armstrong wrote:
David E. Konerding wrote:
Hello, since nobody actually responding with a useful message regarding my report, I'm reposting an extremely simple (1 page) example which exhibits the behavior.
Hmm, I don't see anything about the gtkreactor on the bug tracker.
http://twistedmatrix.com/bugs/
Please attach your example to the report you make.
I'd like to at least confirm that my example is a valid one before reported a bug. So far nobody has reported they can reproduce my example or that my example is wrong. Dave
participants (2)
-
Christopher Armstrong
-
David E. Konerding