> Yeah, a better integration between the two is required. I just didn't have > the > time during the sprints to talk to the Twisted folk. They were keen - perhaps > if you have some time to discuss it with them? :)
I was about to write, "Of course, I've already written them...etc. etc." ... and then I noticed that the email I wrote days ago to the twisted mailing list was still saved as a DRAFT! Oops. I sent it now. No wonder they haven't responded yet... /me kicks himself Oh, and while I'm at it, I might as well cross-post it here so y'all can see it: ------------------------------------------- Is there a way to do the opposite of task.coiterate? I'm using pyglet for my UI, which was working great until I upgraded from pyglet 1.0 to 1.1. Now for some reason, the pyglet performance tanked. Since I'm only using twisted to send AMP messages very rarely (on the order of one every few seconds), it seems like I could try to work around the problem by giving pyglet back control of the main loop and occasionally giving twisted some time to breath (occasionally like every 50ms or something). Can that be done? Here's what I'm doing _now_ that technically works, but pyglet 1.1 is really choking on: > class MyWindow(pyglet.window.Window): > def run(self): > while not self.has_exit: > do_some_stuff_like_dispatching_updating_and_drawing() > yield 1 > > my_window = MyWindow() > task.coiterate(my_window.run()) > reactor.run() By the way, the preferred method for the runloop on pyglet 1.1 is to use a builtin one like so: > window = pyglet.window.Window() > > @window.event > def on_draw(): > window.clear() > do_drawing_stuff() > > pyglet.app.run() So if twisted can stand giving up it's run loop, I could periodically call it from that "on_draw()" method. ~ Nathan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en -~----------~----~----~----~------~----~------~--~---
