SerialDisposable

expect open class SerialDisposable : Disposable

Thread-safe container of one Disposable

actual open class SerialDisposable : Disposable

Thread-safe container of one Disposable

actual open class SerialDisposable : Disposable

Thread-safe container of one Disposable

Constructors

Link copied to clipboard
expect constructor()
actual constructor()
actual constructor()

Properties

Link copied to clipboard
expect open override val isDisposed: Boolean

Checks whether this resource is disposed or not

actual open override val isDisposed: Boolean

Checks whether this resource is disposed or not

actual open override val isDisposed: Boolean

Functions

Link copied to clipboard
expect open override fun dispose()

Disposes this SerialDisposable and a stored Disposable if any. Any future Disposable will be immediately disposed.

actual open override fun dispose()

Disposes this SerialDisposable and a stored Disposable if any. Any future Disposable will be immediately disposed.

actual open override fun dispose()

Disposes this SerialDisposable and a stored Disposable if any. Any future Disposable will be immediately disposed.

Link copied to clipboard
expect fun replace(disposable: Disposable?): Disposable?

Atomically either replaces any existing Disposable with the specified one or disposes it if wrapper is already disposed. Does not dispose any replaced Disposable.

actual fun replace(disposable: Disposable?): Disposable?

Atomically either replaces any existing Disposable with the specified one or disposes it if wrapper is already disposed. Does not dispose any replaced Disposable.

actual fun replace(disposable: Disposable?): Disposable?

Atomically either replaces any existing Disposable with the specified one or disposes it if wrapper is already disposed. Does not dispose any replaced Disposable.

Link copied to clipboard
expect fun set(disposable: Disposable?)

Atomically either replaces any existing Disposable with the specified one or disposes it if wrapper is already disposed. Also disposes any replaced Disposable.

actual fun set(disposable: Disposable?)

Atomically either replaces any existing Disposable with the specified one or disposes it if wrapper is already disposed. Also disposes any replaced Disposable.

actual fun set(disposable: Disposable?)

Atomically either replaces any existing Disposable with the specified one or disposes it if wrapper is already disposed. Also disposes any replaced Disposable.