On Wed, 19 Feb 2020 19:49:48 GMT, Dell Green 
<github.com+12861109+dellgr...@openjdk.org> wrote:

>> Seems a simple enough fix. Probably @johanvos can review it.
> 
>> I don't see any stray commits, so it looks like your branch is based off of 
>> master correctly.
>> 
>> One thing I would ask you to change is that the title of this PR should 
>> exactly match the title of the JBS bug. So can you change it to:
>> 
>> ```
>> 8176499: Dependence on java.util.Timer freezes screen when OS time resets 
>> backwards
>> ```
> 
> apologies, all done

I have a question about the scheduling of the task: 
The old code used Timer.schedule(TimerTask,long,long) which schedules the task 
for repeated fixed-delay execution.
The new code uses ScheduledThreadPoolExecutor.scheduleAtFixedRate​(Runnable, 
long, long, TimeUnit) which schedules the task for repeated fixed-rate 
execution.

Now I think that scheduling at fixed rate would be the correct way as we want 
to reach 60 pulses per second. But my question is: Can this lead to problems if 
the work done per pulse takes longer than 16ms? The scheduleAtFixedRate does 
queue subsequent executions if the previous task takes too long. Couldn't this 
lead to an task queue overflow if the system is overloaded? Do we need to add 
protection for that scenario?

-------------

PR: https://git.openjdk.java.net/jfx/pull/117

Reply via email to