public static class ThreadPoolExecutor.DiscardPolicy
extends Object
implements RejectedExecutionHandler
java.lang.Object | |
↳ | java.util.concurrent.ThreadPoolExecutor.DiscardPolicy |
被拒绝任务的处理程序,默默丢弃被拒绝的任务。
Public constructors |
|
---|---|
ThreadPoolExecutor.DiscardPolicy() 创建一个 |
Public methods |
|
---|---|
void |
rejectedExecution(Runnable r, ThreadPoolExecutor e) 什么都不做,这会有丢弃任务r的效果。 |
Inherited methods |
|
---|---|
From class java.lang.Object
|
|
From interface java.util.concurrent.RejectedExecutionHandler
|
ThreadPoolExecutor.DiscardPolicy ()
创建一个 DiscardPolicy
。
void rejectedExecution (Runnable r, ThreadPoolExecutor e)
什么都不做,这会有丢弃任务r的效果。
Parameters | |
---|---|
r |
Runnable : the runnable task requested to be executed |
e |
ThreadPoolExecutor : the executor attempting to execute this task |