A handler for rejected tasks that discards the oldest unhandled
request and then retries execute, unless the executor
is shut down, in which case the task is discarded.
Obtains and ignores the next task that the executor
would otherwise execute, if one is immediately available,
and then retries execution of task r, unless the executor
is shut down, in which case task r is instead discarded.
Obtains and ignores the next task that the executor
would otherwise execute, if one is immediately available,
and then retries execution of task r, unless the executor
is shut down, in which case task r is instead discarded.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[],["`DiscardOldestPolicy` handles rejected tasks in a `ThreadPoolExecutor`. It discards the oldest unhandled request, then retries executing the current task. If no task is readily available, the current task is ignored. If the executor is shut down, the current task is discarded without retry. This class provides a constructor `DiscardOldestPolicy()` and a method `rejectedExecution(Runnable r, ThreadPoolExecutor e)` to manage task rejection.\n"]]