add

expect fun add(disposable: Disposable): Boolean

Atomically either adds the specified Disposable or disposes it if container is already disposed

Return

true if Disposable was added to the collection, false otherwise

Parameters

disposable

the Disposable to add

actual fun add(disposable: Disposable): Boolean

Atomically either adds the specified Disposable or disposes it if container is already disposed

Return

true if Disposable was added to the collection, false otherwise

Parameters

disposable

the Disposable to add

actual fun add(disposable: Disposable): Boolean

Atomically either adds the specified Disposable or disposes it if container is already disposed

Return

true if Disposable was added to the collection, false otherwise

Parameters

disposable

the Disposable to add