From: David B. <dav...@gm...> - 2010-07-19 23:43:52
|
Hi Brendan, Wenyuan et al, > Hmm... I think in that case we might as well use SDL_threads. We can > just let SDL runtime to handle cross-platform issues. My code > currently only uses quite basic functionality of pthreads. Let me > check what changes need to be made. If SDL threads do what we need, we might as well just go with that. It will make our code cleaner if we can avoid a bunch of #ifdef HAVE_PTHREADS or #ifdef WIN32 conditionals to handle cross-platform differences. As it stands now, the tuxmath LAN server preferentially runs in a thread using pthreads on Linux, whereas on Windows it only works as a standalone executable (not that I've actually gotten a win32 release out with LAN support :-( ). So that ought to be converted to SDL threads as well. This may be a bit analogous to how we used SDL_net last summer instead of straight BSD sockets for the network stuff. Best, David |