S
Sonya Erb
Hi to all!
I have a bit of a problem. I am new to multithreading, but it is necessary
for me to use it in a service that i am developing.
I am receiving numerous messages through a UDP port and need them to be
processed in the order that they arrived.
I would prefer it if they could be processed on a separate thread, but then
I cannot guarantee that they would be processed in the order in which I
received them.
My question is this: Is there anyway to keep only one thread alive and
continuously queue new tasks to it to ensure they are processed in order,
yet on a different thread? Or does someone have a better solution?
Thanks in advance, as I'm really stuck in a pickle.
I have a bit of a problem. I am new to multithreading, but it is necessary
for me to use it in a service that i am developing.
I am receiving numerous messages through a UDP port and need them to be
processed in the order that they arrived.
I would prefer it if they could be processed on a separate thread, but then
I cannot guarantee that they would be processed in the order in which I
received them.
My question is this: Is there anyway to keep only one thread alive and
continuously queue new tasks to it to ensure they are processed in order,
yet on a different thread? Or does someone have a better solution?
Thanks in advance, as I'm really stuck in a pickle.