release

@CheckReturnValue
abstract override fun release(context: SOContext): Completable

Releases a given context, if it has been in use by calling use anytime prior. This will cancel subscriptions to the topics within this context, which means that any Observables returned by subscribeTopic that are not present in any other currently used SOContext will not emit any items anymore and will be disposed.

If e.g. the last context which used ConnectionType.WIFI is released here, the connection will be downgraded to disconnect from WIFI and only use ConnectionType.BLE again.

Scheduler: The returned Completable will operate on the IO Scheduler.

Return

A Completable which completes once the release of the context has succeeded.

Parameters

context

The context to release.

See also