CompletableJob

interface CompletableJob : Job

A job that can be completed using complete() function. It is returned by Job() and SupervisorJob() constructor functions.

All functions on this interface are thread-safe and can be safely invoked from concurrent coroutines without external synchronization.

The CompletableJob interface is not stable for inheritance in 3rd party libraries, as new methods might be added to this interface in the future, but is stable for use.

Functions

complete
Link copied to clipboard
common
abstract fun complete(): Boolean
Completes this job.
completeExceptionally
Link copied to clipboard
common
abstract fun completeExceptionally(exception: Throwable): Boolean
Completes this job exceptionally with a given exception.

Sources

common source
Link copied to clipboard