Hi! I have a problem. I have a program using socket server communication and it works fine as long as I only have one user at time. The flow of the program is Receiver waiting for messenger Sender send message, and start to wait for a response message Receiver get message, and send a response message, start waiting for a now message. And so on� To day I can only send one question at time (can only have one user) but I want to have many� Is it possible to solve with threads? And in that case, does anybody have an example of hove to solve it. Thanks!
author and iconoclast
Your example is pretty much exactly what I'm doing right now. Creating and discarding a thread per request is easy, but not the most efficient. What's the next step up the ladder of complexity, scalability and robustness? Thread pooling?
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi