Timer gets stuck



I have a TimerTask that downloads e-mails from a POP service, and
processes them. I am using a Timer class with initial delay and period
of 5 seconds.

I have observed that at times, the Timer gets "stuck", as in it fails
to execute the task and then I have to restart the application for the
Timer to be working again.

I initially thought that this was because I did not specify the timeout
in the my connection to the POP service, but aren't the subsequent
executions supposed to be independant of each other, so even if one
execution is halted because of a bad POP service, the next execution
should work just fine.

Has anyone experienced this proble of the Timer getting stuck.I am
using JDK 1.4.2.

Any help will be appreciated.

Thanks
Harsh

.



Relevant Pages

  • Re: Timer gets stuck
    ... I have observed that at times, the Timer gets "stuck", as in it fails ... execution is halted because of a bad POP service, ... a java.util.Timer runs all of its tasks on a single thread. ...
    (comp.lang.java.programmer)
  • Re: Timer gets stuck
    ... I have observed that at times, the Timer gets "stuck", as in it ... fails to execute the task and then I have to restart the application ... even if one execution is halted because of a bad POP service, ... A single thread is used to run all tasks, ...
    (comp.lang.java.programmer)
  • Re: Debugging Challenge - no source available
    ... > custom controls. ... > few bitmap operations which use a timer to help time-slice so the UI ... > - the debugger stops at the Application.Runline, there's no call stack, ... > In both cases, the debugger catches execution at the same point, just ...
    (microsoft.public.dotnet.general)
  • Re: How to measure code execution time...?
    ... down clock, to get the execution time on a real processor. ... measure with an external timer. ...
    (comp.arch.embedded)
  • Window messages
    ... Load event handler set a timer for 200ms and the timer's Tick handler will ... In the execution of the Timer event I use a Process.WaitForExit function to ... window messages when my launcher application was running the timer event. ...
    (microsoft.public.dotnet.framework.windowsforms)