No subject
Wed Jan 24 21:54:03 PST 2007
SDL-announce) <sdl.libsdl.org>
List-Unsubscribe:
<http://www.libsdl.org/mailman/listinfo/sdl>,<mailto:sdl-request at libsdl.org?subject=unsubscribe>
List-Archive: <http://www.libsdl.org/pipermail/sdl/>
X-Original-Date: Mon, 15 Apr 2002 10:50:05 -0700
> where exactly is the problem with using graphics and threads? several
times i heared
> SDL wouldn't be thread-safe, but i don't know what *exactly* this does
mean.
> probably, the worst thing is i haven't encountered any problem with
that...
> are there nasty race-conditions still waiting for me?
It's possible. It depends on the platform and driver. For example, in
Windows only the main thread in an application gets event messages, and
SDL responds to some of those messages by performing graphics operations.
In addition, by default DirectX isn't thread-safe. You can turn on a
flag to enable thread-safe graphics access in the DirectX drivers, but
it slows down performance as it has to take critical sections more often.
On X11, there is a single graphics display connection, and if you make
graphics calls from more than one thread, it can corrupt the X11 protocol
queue (which is the cause of the X11 ASYNC errors).
So, in general, unless you really know what you're doing, it's better to
do all of your graphics calls from the main thread.
-Sam Lantinga, Software Engineer, Blizzard Entertainment
_______________________________________________
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl
¤¤¤V¤I¤T¤A¤L¤I¤Y¤¤¤
_________________________________________________________________
Join the worlds largest e-mail service with MSN Hotmail.
http://www.hotmail.com
More information about the SDL
mailing list