Added in API level 1

AbortPolicy

open class AbortPolicy : RejectedExecutionHandler
kotlin.Any
   ↳ java.util.concurrent.ThreadPoolExecutor.AbortPolicy

A handler for rejected tasks that throws a RejectedExecutionException. This is the default handler for ThreadPoolExecutor and ScheduledThreadPoolExecutor.

Summary

Public constructors

Creates an AbortPolicy.

Public methods
open Unit

Always throws RejectedExecutionException.

Public constructors

AbortPolicy

Added in API level 1
AbortPolicy()

Creates an AbortPolicy.

Public methods

rejectedExecution

Added in API level 1
open fun rejectedExecution(
    r: Runnable!,
    e: ThreadPoolExecutor!
): Unit

Always throws RejectedExecutionException.

Parameters
r Runnable!: the runnable task requested to be executed
executor the executor attempting to execute this task
e ThreadPoolExecutor!: the executor attempting to execute this task
Exceptions
java.util.concurrent.RejectedExecutionException always