[SDL] http://www.uk.research.att.com/vnc/ : Correction

Warren Downs warren at businesslink.com
Fri Aug 27 11:24:18 PDT 1999


>>>>> "Sam" == Sam Lantinga <slouken at devolution.com> writes:

    >> >From looking at the SDL code, it looks like it is impossible
    >> to use SDL to play video in two windows, from two different
    >> threads, because SDL uses global variables and is
    >> fundammentally not reentrant.

    >> Is that correct ?

    Sam> That is correct.  The big thing on the plate for SDL 0.11
    Sam> (which should start development next week) is getting rid of
    Sam> the global variables and making SDL reentrant and support
    Sam> multiple output devices.

Heh.  I didn't even think of that as an example of the need for
re-entrancy.  Maybe I could have saved some typing if I had thought to
mention that first, but sometimes I have a hard time coming up with
real-world examples of why things should be architected properly
because I think real-world examples often lead people astray.  The
problem with having to use examples to convince people is that if you
can't think of the right examples, people may make the wrong decision,
yet with something like re-entrancy, the answer is obvious even if you
can't think of any examples.

    >> I know, I had to do that for MpegTV.  It was painful and took
    >> me about a week, but I am happy I did it (i.e. made all the
    >> mtvp code reentrant).

    Sam> Yup, I'm not looking forward to it, but it needs to be
    Sam> done. :)

Yay!

    Sam> 	-Sam Lantinga (slouken at devolution.com)

    Sam> Lead Programmer, Loki Entertainment Software -- "Any
    Sam> sufficiently advanced bug is indistinguishable from a
    Sam> feature" -- Rich Kulawiec

--Cliff
ctm at ardi.com



More information about the SDL mailing list