[SDL] [Framework] Event-based Networking
cgloeckner at freenet.de
Mon Mar 18 12:17:34 PDT 2013
Forest Hale wrote:
> From experience porting apps from Windows to Linux and OSX, the platforms that have KillThread functionality have giant hazard warnings in the API docs, because it leaks resources (it does not
> terminate the thread cleanly and leaves it hanging around in the process table until the parent exits).
> So as a matter of design NEVER kill threads! You need to tell them to exit by other means (and remember mutex is not the only synchronization primitive in your toolbox - semaphores and condvars have
> significant utility).
That's right! I read this at the documentation about SDL_CreateThread. The killing-part is just a left-over piece of code. I will replace it in the future.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SDL