asmodehn / sdlut

SDL utility toolkit - A C++ wrapper arount SDL 1.2
BSD 2-Clause "Simplified" License
2 stars 1 forks source link

Thread wait() and kill() #6

Open asmodehn opened 10 years ago

asmodehn commented 10 years ago

XorfacX : Thread wait() and kill() does not do anything. Also they're sometimes not even used if thread number is 0. See TestThread for more infos.

asmodehn commented 10 years ago

Found a problem in Thread class where the SDL_Thread ID wasnt stored properly, therefore SDLut was unable to kill it afterwards. I fixed that, now the problem is to make sure the Thread is invalidated after it has been terminated. however we dont know when that might happen. Some work has to be done in the callback template. Since this structure and behavior is very similar to the Timer one, that also has problems, I will review both... and hopefuly find a unified solution... At the moment Thread and Timer are quite different in code, but they should be very similar...