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!