//reactivestate-core/com.ensody.reactivestate/DisposableGroup
DisposableGroup¶
interface DisposableGroup : DisposableHandle
A Disposable that can dispose multiple Disposable and Job instances at once.
On dispose this destroys all Disposable and Job instances attached to it.
Inheritors¶
WhileUsedReferenceToken |
Properties¶
Name | Summary |
---|---|
size | [common] abstract val size: Int |
Functions¶
Name | Summary |
---|---|
add | [common] abstract fun add(disposable: Disposable) Add a Disposable to this group. [common] abstract fun add(job: Job) Add a Job to this group. |
dispose | [common] abstract fun dispose() |
disposeOnCompletionOf | [common] fun Disposable.disposeOnCompletionOf(launcher: CoroutineLauncher): Disposable Disposes the Disposable when CoroutineLauncher completes (including cancellation). [common] fun Disposable.disposeOnCompletionOf(context: CoroutineContext): Disposable Disposes the Disposable when CoroutineContext completes (including cancellation). [common] fun Disposable.disposeOnCompletionOf(scope: CoroutineScope): Disposable Disposes the Disposable when CoroutineScope completes (including cancellation). [common] fun Disposable.disposeOnCompletionOf(job: Job): Disposable Disposes the Disposable when Job completes (including cancellation). |
remove | [common] abstract fun remove(disposable: Disposable) Remove a Disposable from this group. [common] abstract fun remove(job: Job) Remove a Job from this group. |