]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Replace OrientationRestorer TimerTask usage with ScheduledExecutor 20/1320/2
authorjsimomaa <jani.simomaa@gmail.com>
Thu, 14 Dec 2017 06:16:51 +0000 (08:16 +0200)
committerJani Simomaa <jani.simomaa@semantum.fi>
Thu, 14 Dec 2017 06:17:18 +0000 (08:17 +0200)
Timer can exhaust the system with TimerTask-runnables that are queued up
e.g. during computer hibernate and sleep. According to documentation:

If an execution is delayed for any reason (such as garbage collection or
other background activity), two or more executions will occur in rapid
succession to "catch up." In the long run, the frequency of execution
will be exactly the reciprocal of the specified period

With heavy tasks this is very bad

refs #7682

Change-Id: I5a097c8bc5e1ea2a5abe30905b2a46fa8b8386f8


No differences found