[SDL] [patch] OS X carbon SDL_WINDOWID support

earl earl at stanfordalumni.org
Wed Sep 27 14:57:02 PDT 2006

Christian wrote:
> earl wrote:
> > The SDL FAQ reminds us that "most graphics back-ends are not
> > thread-safe".  However it should be OK to call SDL video functions
> > strictly from a single thread even if that thread is not the main thread
> > of an application, right?
> No. Many windowing systems explicitly require to be called only from the
> main thread. At least that used to be the case with Cocoa, as far as I
> remember, though it seems that the restriction has been somewhat
> weakened in recent versions. See
> for details about what you can and can't do from non-main threads.

Thanks very much for pointing out this documentation and saving me from
making a big mistake.  My application is being reworked now to keep all
the SDL video function calls in the main thread.

I took the liberty of adding a note about this to the FAQ:
Just out of curiosity, does anyone know any good references for why
calling SDL video functions from a non-main thread is forbidden on other
platforms?  If so I'd like to add those references to the FAQ too.

Regardless of this discussion about threads, I'm still very interested
in feedback from anyone who tries out the carbon SDL_WINDOWID patch. 
Can I do anything to help get it accepted into SVN?

Earl Levine

More information about the SDL mailing list