WhileUsedReferenceToken

The reference token passed to the WhileUsed builder function.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
val scope: CoroutineScope

A lazily created MainScope that lives only as long as the WhileUsed value.

Link copied to clipboard
open override val size: Int

Functions

Link copied to clipboard
open override fun add(disposable: Disposable)

Add a Disposable to this group.

open override fun add(job: Job)

Add a Job to this group.

Link copied to clipboard
open override fun dispose()
Link copied to clipboard

Disposes the Disposable when CoroutineLauncher completes (including cancellation).

Disposes the Disposable when CoroutineContext completes (including cancellation).

fun Disposable.disposeOnCompletionOf(scope: CoroutineScope): Disposable

Disposes the Disposable when CoroutineScope completes (including cancellation).

Disposes the Disposable when Job completes (including cancellation).

Link copied to clipboard
open override fun remove(disposable: Disposable)

Remove a Disposable from this group.

open override fun remove(job: Job)

Remove a Job from this group.