Skip to content

FlushableExecutorService

Xavier F. Gouchet edited this page Sep 4, 2024 · 1 revision

interface FlushableExecutorService : ExecutorService

An ExecutorService which backing queue can be drained to a collection.

Types

FlushableExecutorService.Factory

Functions

drainTo

abstract fun drainTo(destination: MutableCollection<Runnable>)

Drains the queue backing this ExecutorService into the provided mutable collection. After this operation, the executor's queue will be empty, and all the runnable entries added to the destination won't have run yet.

Parameters
destination the collection into which Runnable in the queue should be drained to.
Clone this wiki locally