Pygame, mouse events and threads
Ben Sizer
kylotan at gmail.com
Thu Aug 24 08:27:08 EDT 2006
jedi200581 at yahoo.co.uk wrote:
> When I put the content of the run and input functions in the main
> thread, it's working, why not in the thread?
Because event handling needs to be done in the main thread. So does
rendering. This is a limitation of the underlying system.
As a general rule, try to keep all your PyGame functions in the main
thread and push your other processing into background threads, if you
really need them.
--
Ben Sizer
More information about the Python-list
mailing list