Core Library0.xAPI reference

Choose documentation 1

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

MoreLess about this notice

function libtmux-kotlin

retryIfSafe

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

Source and package
Qualified name
io.github.libtmux.kotlin.retryIfSafe
Package
io.github.libtmux.kotlin
Distribution
io.github.libtmux:libtmux-kotlin
Source
libtmux-kotlin/src/main/kotlin/io/github/libtmux/kotlin/Retry.kt
public Kotlin suspending functionsAllows 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 functionsAllows a function to call suspending operations and pause without blocking a thread. It does not start a coroutine by itself.Language documentation () -> T ): T

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.

Type parameters
Parameters
  • times (Int)

    Default 1

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

Recorded calls

source calls
No call edges in the Kotlin model.

The Kotlin reference records declarations, not calls, so this page shows no callers or callees. That is a limit of the extracted data, not a statement that nothing calls io.github.libtmux.kotlin.retryIfSafe.

Guides

task material

Pages that discuss retryIfSafe.

Esc
Search in

Type to search.

Reference previewOpen reference