[concurrency-interest] ScheduledThreadPoolExecutor schdeulingproblem ?

David Holmes dcholmes at optusnet.com.au
Tue Jan 1 04:39:23 EST 2008


Just to make this point clearer ...

> The design of the CronThreadPoolExecutor
> ...
> is to try to figure out an absolute time in the future to execute by
> calculating the difference of the future time from now.

Conversion of relative times to absolute times is extremely risky, unless
you can guarantee no preemption between the point where you determine the
desired value of the relative time and the point where you measure "now".

Also note that relative time sources and timing mechanisms should be
unaffected by changes to the "system time", whereas absolute ones should be
affected. Unfortunately there are also a lot of bugs in this area too.

David Holmes



More information about the Concurrency-interest mailing list