I am writing a server, and I send each action of into a separate thread when the request is received. I do this because almost every request makes a database query. I am usi
I think this is a bit of a dodge to your question, but why not fork them into processes? My understanding of networking (from the hazy days of yore, I don't really code networks at all) was that each incoming connection can be handled as a separate process, because then if someone does something nasty in your process, it doesn't nuke the entire program.