On Mon, May 11, 2009 at 12:06 AM, Matt Jones <[email protected]> wrote:
> > So I've come across what seems like a strange problem with > interactions between Pyglet and wxPython on OS X. My apologies if > this isn't the right forum for this - feel free to direct me elsewhere > if it's not... > > I've got a very simple program where a thread creates a wx App and > Frame. This thread is started from the main thread. When importing > (but not even using) pyglet.gl.gl on OS X, the event loop seems to > hang - I just get a spinning beach ball when mousing over the app. > > When not importing pyglet.gl.gl, or when launching the App / Frame > from the main thread instead of the second Thread, everything works > fine. It is typically not a good idea to try to gather events from the OS or perform OpenGL rendering from a secondary thread (particularly on OS X). If you do need to do this, make very sure that one and only one thread is interacting with the windowing and event handling code, Also worth noting is that due to the global interpreter lock, using multiple threads in python has no real performance benefit, so only use multiple threads if you need preemption. -- Tristam MacDonald http://swiftcoder.wordpress.com/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
