I
itt ium
Group,
I have recently modified a software from single threaded to
multithreaded design. In single threaded version, a connection fd was
read by single thread, so event were always delivered in order. Now
since multiple threads handle different events (on the same fd), the
events are sometimes delivered out of order. Please note, on the
connection fd, events are received in proper order and this non-
deterministic behavior is introduced by my software only.
Following are my doubt
1. How to handle such a situation
2. Is it a bad idea to have multiple threads for the same fd. If yes
than how to increase capacity of a software that receives large amount
of data on a single fd only.
Because of the relevance I am posting the message to following groups.
comp.unix.programmer
comp.programming.threads
thanks
Ittium
I have recently modified a software from single threaded to
multithreaded design. In single threaded version, a connection fd was
read by single thread, so event were always delivered in order. Now
since multiple threads handle different events (on the same fd), the
events are sometimes delivered out of order. Please note, on the
connection fd, events are received in proper order and this non-
deterministic behavior is introduced by my software only.
Following are my doubt
1. How to handle such a situation
2. Is it a bad idea to have multiple threads for the same fd. If yes
than how to increase capacity of a software that receives large amount
of data on a single fd only.
Because of the relevance I am posting the message to following groups.
comp.unix.programmer
comp.programming.threads
thanks
Ittium