michael potter
2004-11-16 02:00:58 UTC
I am seeing a condition in my code that causes a small looping
condition.
select returns that a pipe is ready to read, but when the pipe is read
there is no data to be read. The program returns to the select which
immediately returns that there is data to be read ...
I have added logic to detect this condition and sleep for one second.
This sleep seems to allow the data that is supposed to be in the pipe
to "catch up" with what ever select is looking at to determine that
there is data in the pipe. Adding the one second sleep probably frees
up the cpu so it can deliver the data.
I am getting ready to add some more logic to gather more information
about what I am seeing. It does not happen very often so it is a
difficult problem to track. The one second sleep has turned it into a
low priority problem too.
Can someone in the group give me some insight on what I am seeing?
Not supprisingly, It seems to happen when the cpu is busy.
I have seen this on aix 5.x and solaris 9.x
condition.
select returns that a pipe is ready to read, but when the pipe is read
there is no data to be read. The program returns to the select which
immediately returns that there is data to be read ...
I have added logic to detect this condition and sleep for one second.
This sleep seems to allow the data that is supposed to be in the pipe
to "catch up" with what ever select is looking at to determine that
there is data in the pipe. Adding the one second sleep probably frees
up the cpu so it can deliver the data.
I am getting ready to add some more logic to gather more information
about what I am seeing. It does not happen very often so it is a
difficult problem to track. The one second sleep has turned it into a
low priority problem too.
Can someone in the group give me some insight on what I am seeing?
Not supprisingly, It seems to happen when the cpu is busy.
I have seen this on aix 5.x and solaris 9.x
--
Michael Potter
***@gmail.com
Michael Potter
***@gmail.com