Changes between Version 1 and Version 2 of Ticket #1331


Ignore:
Timestamp:
Jul 22, 2011 3:05:26 AM (13 years ago)
Author:
bennylp
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1331 – Description

    v1 v2  
    11SDL requires its execution to be executed on main thread, or in the same thread that the window was created, depending on platform. This ticket creates a framework to perform this task. 
    22 
    3 Note: this may need to change #1278 (System specific initialization during application startup). 
     3Note: this may need to change #1278 (System specific initialization during application startup) 
     4 
     5'''Update 22/07/11:''' 
     6 
     7After some testing, we found that main thread execution is only required for Mac OS X, and we can limit this Mac OS specific approach to the sdl_dev.c only. The following is summary on thread execution model for SDL across various platforms. They are tested against '''SDL-1.3''' (latest from repository as of this date). 
     8 
     9'''Mac OS X:''' everything must be done in main thread. 
     10 
     11'''Linux/X11:''' drawing and event polling must be done in the same thread as the thread that created the window, otherwise there will be no picture. Multiple windows are supported, but they must be done in the same '''one thread''' (it doesn't have to be the main thread). If each of the window uses a separate thread, crash will happen during window creation. 
     12 
     13'''Windows:''' drawing and event polling must be done in the same thread as the thread that created the window. Multiple windows are supported, and each may use a dedicated thread, as long as window creation, drawing, and event polling for one window all use the same thread. 
     14 
     15