Core LibraryAPI Reference

Choose documentation 1

latest

Current version

latest
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

function libtmux-kotlin latest

retryIfSafe

Package io.github.libtmux.kotlin.retryIfSafe io.github.libtmux.kotlin

Retries block up to times more times after a DispatchException whose DispatchException.safeToRetry says the exact same request can be sent again.

View as Markdown

Source and package
Module
io.github.libtmux.kotlin
Package
io.github.libtmux:libtmux-kotlin
Source
libtmux-kotlin/src/main/kotlin/io/github/libtmux/kotlin/Retry.kt
public Kotlin suspending functions Allows a function to call suspending operations and pause without blocking a thread. It does not start a coroutine by itself. Language documentation fun <T> retryIfSafe(times: Int = 1, block: Kotlin suspending functions Allows a function to call suspending operations and pause without blocking a thread. It does not start a coroutine by itself. Language documentation () -> T): T
functionasync [source]

Description#

No retry executor lives in this library: DispatchException.safeToRetry is computed by the operation that threw it from its own catalogued idempotence, so this needs no per-call lookup and composes with any retry library a caller already uses instead of replacing it.

Parameters
  • times ( Int )

  • block ( Kotlin suspending functions Allows a function to call suspending operations and pause without blocking a thread. It does not start a coroutine by itself. Language documentation )

Discussed in Getting started

Esc

Type to search.