FlushableExecutorService - DataDog/dd-sdk-android GitHub Wiki

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.