queueOrRun

fun <T : IviServiceApi> T.queueOrRun(action: (T) -> Unit)

Runs an action if the service is available. Otherwise, it adds the action to a queue that will be processed when the service becomes available.