[SDL] how to detect if a thread is still running
hj at imbens.nl
Tue Jul 23 12:39:00 PDT 2002
> > When I create a thread I get a pointer to an SDL_Thread structure.
> > It seems to me I can use the status field to detect whether the thread
> > finished, but to use it, I have to include SDL_Thread_c.h which seems
> > be meant to be included.
> > So what is the correct, platform independent, way to do this?
> I usually have a global variable and set it when I want the thread to
I don't want the thread to quit. It is doing a lengthy calculation for me
and it quits when it has finished. It would have been easiest for me if
there were some function int SDL_ThreadStatus (SDLThread *thread) that
allows me to get the status of the thread without having to add a global
flag and a mutex to protect that flag.
More information about the SDL