Added in API level 1
CallerRunsPolicy
open class CallerRunsPolicy : RejectedExecutionHandler
kotlin.Any | |
↳ | java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy |
A handler for rejected tasks that runs the rejected task directly in the calling thread of the execute
method, unless the executor has been shut down, in which case the task is discarded.
Summary
Public constructors | |
---|---|
Creates a |
Public methods | |
---|---|
open Unit |
rejectedExecution(r: Runnable!, e: ThreadPoolExecutor!) Executes task r in the caller's thread, unless the executor has been shut down, in which case the task is discarded. |
Public constructors
Public methods
rejectedExecution
Added in API level 1
open fun rejectedExecution(
r: Runnable!,
e: ThreadPoolExecutor!
): Unit
Executes task r in the caller's thread, unless the executor has been shut down, in which case the task is discarded.
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 |
if there is no remedy |