1. pygame
  2. pygame
  3. pygame
  4. Issues

Issues

Issue #56 resolved

The documentation of pygame.event should mention threading issues

René Dudfield
created an issue

== , 2010-11-18 02:48:31 -0800

{{{ On MS Windows, the Pygame event loop will not receive any mouse or keyboard events if it is run in a thread other than the main thread. Windows will still render all surface and display operations, but it will display the busy cursor over the Pygame window. Also the window can not be moved or closed normally. See http://bytes.com/topic/python/answers/527272-pygame-mouse-events-threads for a reference discussion.

The current Pygame docs at http://www.pygame.org/docs/ref/event.html do not mention this.

Since a background thread event loop does work on Linux, the issue can be hard to track down in multi-platform development.

To aid developers, I propose that the documentation on pygame.event explicitly mentions that the event loop is not thread safe and must be run in the main thread. }}}


Comments (1)

  1. Log in to comment