fromRunnable

@Contract(value = "_ -> new")
open fun fromRunnable(@NonNull run: Runnable): Disposable

Construct a Disposable by wrapping a Runnable that is executed exactly once when the Disposable is disposed.

Return

the new Disposable instance

Parameters

run

the Runnable to wrap

Throws