Results 1 to 2 of 2
Hi all,
I have a question.
I have two threads which have two different sets of fds which will be polled using poll( time out = 0 ) system call ...
- 11-19-2009 #1Just Joined!
- Join Date
- Feb 2006
- Posts
- 13
Will Poll miss events
Hi all,
I have a question.
I have two threads which have two different sets of fds which will be polled using poll( time out = 0 ) system call one thread at a time.
Since no of fds in every thread will be in order of 100.
I just want to know, when an event comes for an fd, will the event for that particular fd will wait till it is being polled.
what are the chances of poll missing the events?. I hope this might have been discussed earlier. If so then can you point me to the correct link. I searched for it but I am not able to find any relevant links.
thanks in advance
srinath.D
- 11-20-2009 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,961
Usually the select() system call is used to be notified of events on fd's. In such cases, usually one thread waits on select() for something interesting to happen, and it will then dispatch the work on that fd/socket to another thread while it goes back to waiting for all the other descriptors. This is fairly standard parallel processing stuff that a lot of people have to deal with. Remember that sockets and file descriptors in Unix/Linux systems are treated much the same, so you can use functions like select() for this purpose.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote
