Original Post
I've been contemplating threading parts of my game server, but I am not exactly sure about the best way to go about it. MODEL #1 -- I first considered having game logic and connection producer be the "main thread" and having each connection be its own individual thread. (So, 100 active players would result in 101 threads total running.) I eventually shied away from that because I did not like the idea of being uncertain about which connection is running when. MODEL #2 -- My second design involved having two threads: the main game logic thread and the connection handler thread. The connection handler thread would just run in circles checking each connection for updates, checking for new connection requests, etc. Any suggestions on which direction is superior? Or are they the same with just different implications? Or is there a third model I don't know about? :P