dholmes at dltech.com.au
Thu Apr 7 01:31:55 EDT 2005
> My question is if the single thread terminates due to a failure,
> do we expect
> 1) a new one to take its place so the periodic command will still be
> re-scheduled and get executed ? Or
> 2) the failure to cause a termination of the periodic execution so the
> command will not be re-scheduled ?
2) As per the docs for ScheduledThreadPoolExecutor - see scheduleAtFixedRate
"If any execution of the task encounters an exception, subsequent executions
The presumption is that an exception from one run of the task is likely to
preclude it being able to run in the future, so it is dropped. If a task
thinks it can tolerate exceptions then it should not let them propagate.
More information about the Concurrency-interest