in reply to Re: Issue with time() in loop?
in thread Issue with time() in loop?
Maybe the example I gave was not a very good representation. It seems that most of the replys are focusing on the socket and the thread when these are more than likely not the issue. I am using threads because that is what my application calls for. IO::Select would not be the best choice in my case because there are thousands of lines of code a second coming across more than 100 socket connections simultaneously. I chose the method I did because of what my app does.
It was also suggested to use the timeout feature of IO::Select, this would also not be what I want becasue I want the function to be executed after a set amount of time no matter if the socket is receiving data or not. It was also asked if I know this is happening becasue I wait 25 minutes? Well actually no, I know it is happening because I wait two or three hours when it is suppose to happen after 30 minutes and it never does. I also use threads because in the real application I detach this thread so it monitors the time and only the time independant of anything else that is going on in the application.
I know not all of this applies to your post Tanktalus, but I just wanted to reply to everyones questions so far in one place. Maybe this will give a better idea of what is going on?
Edit: I also forgot to mention that my original question was a bit misleeding. The detached thread I use to check the time does use a simple while (1) loop. In the application for each thread I also use another while loop monitoring the socket. I kinda mixed those two together.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Issue with time() in loop?
by Tanktalus (Canon) on Nov 13, 2005 at 20:39 UTC |