Re: threaded pyglet
Depending completely on what you are doing with threads, you could have a look at something like greenlets - http://codespeak.net/py/dist/greenlet.html - or if you were doing networking - http://wiki.secondlife.com/wiki/Eventlet John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to pyglet-users@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: threaded pyglet
On Jan 3, 8:52 pm, Richard Jones <[EMAIL PROTECTED]> wrote: > Ensure only one thread is doing actual pyglet stuff (rendering, event loop, > etc). See how you go... In particular, it's common for rendering systems to require all access to be done from just one thread (sometimes only the main thread). For a library to attempt to remove that restriction for you would probably impose all sorts of locking overhead behind the scenes for very little gain. -- Ben Sizer --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to pyglet-users@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: threaded pyglet
Thanks Alex, Rod and Richard! Looks like I'm going to have to write an events queue and listener. On Jan 3, 10:52 pm, Richard Jones <[EMAIL PROTECTED]> wrote: > On Thu, 3 Jan 2008, Janto wrote: > > I'm getting "Xlib: unexpected async reply" errors in my pyglet > > application. This is apparently due to my multithreaded calls to > > pyglet (seehttp://www.faqs.org/faqs/x-faq/part7/section-15.html). > > > Is it possible to use pyglet and threads together? > > I have, but as with all threaded applications you're opening a can of worms. > > Ensure only one thread is doing actual pyglet stuff (rendering, event loop, > etc). See how you go... > > Richard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to pyglet-users@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: threaded pyglet
On Thu, 3 Jan 2008, Janto wrote: > I'm getting "Xlib: unexpected async reply" errors in my pyglet > application. This is apparently due to my multithreaded calls to > pyglet (see http://www.faqs.org/faqs/x-faq/part7/section-15.html). > > Is it possible to use pyglet and threads together? I have, but as with all threaded applications you're opening a can of worms. Ensure only one thread is doing actual pyglet stuff (rendering, event loop, etc). See how you go... Richard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to pyglet-users@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: threaded pyglet
On Jan 3, 2008 9:19 AM, Janto <[EMAIL PROTECTED]> wrote: > Is it possible to use pyglet and threads together? Yes, as long as you confine of your Pyglet-related calls to a single thread. --- Rod --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to pyglet-users@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: threaded pyglet
On Jan 3, 2008 8:19 PM, Janto <[EMAIL PROTECTED]> wrote: > > Hi! > > I'm getting "Xlib: unexpected async reply" errors in my pyglet > application. This is apparently due to my multithreaded calls to > pyglet (see http://www.faqs.org/faqs/x-faq/part7/section-15.html). > > Is it possible to use pyglet and threads together? pyglet is completely thread-unsafe; you'll need to manage all locking yourself. Alex. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to pyglet-users@googlegroups.com 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 -~--~~~~--~~--~--~---