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

tmux.Poll

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

View as Markdown

Module
tmux
Package
github.com/libtmux/libtmux-go/tmux
Source
tmux/poll.go
Poll ( ctx : context.Context , interval : time.Duration , condition : func(context.Context) (bool, error) ) → error
function [source]
function [source]
Poll

Poll checks condition immediately and then after each interval, until it reports true, returns an error, or ctx ends.

A condition receives ctx and must observe cancellation itself; Poll cannot interrupt one already running. Poll returns condition errors unchanged and ctx.Err when ctx ends first.

Poll is for a state tmux does not announce. Waiting for a pane to print something is not one: PaneObservation.WaitFor is woken by tmux as the pane writes, where a poll re-reads the screen on a guess and can match a shell's echo of what was typed. Server.WaitFor waits on tmux's separate wait-for channel.

0 declared, 0 inherited

Esc

Type to search.