invokeOnDestroy
Register a handle to be invoked when this TorCtrl instance is destroyed. If handle is already registered, Disposable.noOp is returned.
If TorCtrl is already destroyed, handle is invoked immediately and Disposable.noOp is returned.
handle should NOT throw exception. In the event that it does, it will be delegated to Factory.handler. If TorCtrl is destroyed and handle is invoked immediately, it will be delegated to UncaughtException.Handler.THROW. handle should be non-blocking, fast, and thread-safe.
Implementations of TorCtrl returned by Factory.connectAsync or io.matthewnelson.kmp.tor.runtime.ctrl.TorCtrl.Factory.connect invoke handle from its background thread on Jvm & Native, unless immediate invocation is being had due to TorCtrl already being destroyed, in which case it will be invoked from the context of invokeOnDestroy caller.
Return
Disposable to de-register handle if it is no longer needed.
Register a handle to be invoked when this TorCtrl instance is destroyed. If handle is already registered, Disposable.noOp is returned.
If TorCtrl is already destroyed, handle is invoked immediately and Disposable.noOp is returned.
handle should NOT throw exception. In the event that it does, it will be delegated to Factory.handler. If TorCtrl is destroyed and handle is invoked immediately, it will be delegated to UncaughtException.Handler.THROW. handle should be non-blocking, fast, and thread-safe.
Implementations of TorCtrl returned by Factory.connectAsync invoke handle from its background thread on Jvm & Native, unless immediate invocation is being had due to TorCtrl already being destroyed, in which case it will be invoked from the context of invokeOnDestroy caller.
Return
Disposable to de-register handle if it is no longer needed.
Register a handle to be invoked when this TorCtrl instance is destroyed. If handle is already registered, Disposable.noOp is returned.
If TorCtrl is already destroyed, handle is invoked immediately and Disposable.noOp is returned.
handle should NOT throw exception. In the event that it does, it will be delegated to Factory.handler. If TorCtrl is destroyed and handle is invoked immediately, it will be delegated to UncaughtException.Handler.THROW. handle should be non-blocking, fast, and thread-safe.
Implementations of TorCtrl returned by Factory.connectAsync or Factory.connect invoke handle from its background thread, unless immediate invocation is being had due to TorCtrl already being destroyed, in which case it will be invoked from the context of invokeOnDestroy caller.
Return
Disposable to de-register handle if it is no longer needed.