Most visited

Recently visited

Added in API level 1

ThreadPoolExecutor.DiscardPolicy

public static class ThreadPoolExecutor.DiscardPolicy
extends Object implements RejectedExecutionHandler

java.lang.Object
    java.util.concurrent.ThreadPoolExecutor.DiscardPolicy


被拒绝任务的处理程序,默默丢弃被拒绝的任务。

摘要(Summary)

Public constructors

ThreadPoolExecutor.DiscardPolicy()

创建一个 DiscardPolicy

公共方法(Public methods)

void rejectedExecution(Runnable r, ThreadPoolExecutor e)

什么都不做,这会有丢弃任务r的效果。

继承方法(Inherited methods)

From class java.lang.Object
From interface java.util.concurrent.RejectedExecutionHandler

Public constructors

ThreadPoolExecutor.DiscardPolicy

Added in API level 1
ThreadPoolExecutor.DiscardPolicy ()

创建一个 DiscardPolicy

公共方法(Public methods)

rejectedExecution

Added in API level 1
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

Hooray!