[concurrency-interest] ScheduledExecutor execute takes longer
thanthe next job.. what is going to happen?
dl at cs.oswego.edu
Wed Sep 7 11:13:13 EDT 2005
David Holmes wrote:
> scheduleAtFixedRate is less clear on how it behaves. I believe the basic
> model for periodic tasks is that at the end of each execution the task looks
> to see if its period has elapsed since its last "start" time and if so it is
> eligible to run again. This means that you'll never have multiple executions
> of the one task happening concurrently even if multiple periods have passed.
> But I don't know if it will execute again immediately or have to wait its
> turn if others tasks could also execute.
Right. There are no promises about how long after it is re-enabled that
it will start. (We can't make any since it depends in part on numbers
of threads and tasks.)
More information about the Concurrency-interest