A message on threading documenation

Folks,

There a lot questions about multi-threading with rendering, UI, audio,
events etc. What is possible, what is not.
What about a wiki-page dedicated to multi-threading, what is possible with
it (pump/peek events), what is not possible and what to avoid.
It would prevent lots of emails and forum posts.

With kind regards,

Jos

Hi,

that was my suggestion in one of the previous thread discussions.

I agree with the idea.–
Paulo

On Thu, Jan 20, 2011 at 12:40 PM, Jos Kuijpers wrote:

Folks,

There a lot questions about multi-threading with rendering, UI, audio,
events etc. What is possible, what is not.
What about a wiki-page dedicated to multi-threading, what is possible with
it (pump/peek events), what is not possible and what to avoid.
It would prevent lots of emails and forum posts.

With kind regards,

Jos


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

It would be better to just include a note in the current threading documentation that you should not expect to be able to create a window, render, or recieve events on any thread other than the main one. That covers everything.------------------------
EM3 Nathaniel Fries, U.S. Navy

http://natefries.net/

AgreedOn Thu, Jan 20, 2011 at 5:38 PM, Nathaniel J Fries wrote:

It would be better to just include a note in the current threading
documentation that you should not expect to be able to create a window,
render, or recieve events on any thread other than the main one. That covers
everything.


EM3 Nathaniel Fries, U.S. Navy

http://natefries.net/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

A mention of which operating system (Windows…) this restriction
applies to might be nice. Also, as I understand it, it is not
necessarily the main thread, but merely the same thread that SDL video
is initialized from (using SDL_Init, SDL_InitSubSystem, or
SDL_VideoInit). You could, for example, spawn a thread and do all of
your SDL specific stuff in that, while handling networking and game
logic in the main thread.

It’s also possible to remove this restriction if someone’s willing to
work on it.On 20 January 2011 11:38, Nathaniel J Fries wrote:

It would be better to just include a note in the current threading
documentation that you should not expect to be able to create a window,
render, or recieve events on any thread other than the main one. That covers
everything.