D
Diego F.
Hello. I have a doubt about multi-threading, if it is or not the best way to
achieve the following:
I have a server application that listens a port through a socket.
A client will send messages to that application (many messages).
Because the amount of messages is huge, the server application should only
send each received message to another process (a thread?) that manages the
message, and then go with the next message.
I want a limited number of threads, so the server app just looks for one
that is free and send the message to it. Once the threads finish the work,
they wait to be called by the server app.
Are threads the solution for that?
Regards,
Diego F.
achieve the following:
I have a server application that listens a port through a socket.
A client will send messages to that application (many messages).
Because the amount of messages is huge, the server application should only
send each received message to another process (a thread?) that manages the
message, and then go with the next message.
I want a limited number of threads, so the server app just looks for one
that is free and send the message to it. Once the threads finish the work,
they wait to be called by the server app.
Are threads the solution for that?
Regards,
Diego F.