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

waitUntil(within:_:)

Swift
  • Python Unavailable
  • Ruby Unavailable
  • Lua Unavailable
  • TypeScript Unavailable
  • Rust Unavailable
  • Go Unavailable
  • Java Unavailable
  • .NET Unavailable
  • C++ Unavailable
  • Swift

View as Markdown

Package
libtmux-swift
Source
Tests/TmuxFixture/TmuxFixture.swift
waitUntil(within:_:) ( within : Duration , condition : () async throws -> Bool ) → Bool
functionasync [source]
functionasync [source]
waitUntil(within:_:)

Polls condition until it holds, and reports whether it did.

Bounded in wall-clock rather than in attempts. What makes one of these polls slow is the tmux call inside it, so a count of attempts says nothing about how long the loop can run: on a contended machine a generous-looking budget outlives the case's time limit, and the failure reads as a timeout instead of naming the thing that never became true.

Raises

Discussed in Waiting and retrying

0 declared, 0 inherited

Esc

Type to search.