There are two properties with the following getters (and accompanying setters) in ScheduledThreadPoolExecutor:
boolean getContinueExistingPeriodicTasksAfterShutdownPolicy()
Get the policy on whether to continue executing existing periodic tasks even when this executor has been shutdown. In this case, these tasks will only terminate upon shutdownNow or after setting the policy to false when already shutdown. This value is by default false.
boolean getExecuteExistingDelayedTasksAfterShutdownPolicy()
Get policy on whether to execute existing delayed tasks even when this executor has been shutdown. In this case, these tasks will only terminate upon shutdownNow, or after setting the policy to false when already shutdown. This value is by default true.
Why do they have different default values, and is there ever a reason to change the value of these properties?
Also, how are you supposed to change/configure them if you just use the Executors
static methods to create instances of ScheduledExecutorService
(which doesn't have methods to tweak the above properties)?