If I run a job regularly in ScheduledThreadPoolExecutor#scheduleAtFixedRate, if the job runs longer than the run interval, the next job execution will be delayed during that time, but if the previous job is not finished, can I stop the new job execution?Is it impossible if I don't create and control Mutex on the job side?
setlock-n
as daemontools calls it.
Could you check the number of stays with ScheduledThreadPoolExecutor #getQueue()#size()?
© 2024 OneMinuteCode. All rights reserved.