Core Library0.xAPI Reference

Choose documentation 3

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.

function libtmux-go latest

Poll

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

Source and package
Qualified name
tmux.Poll
Package
tmux
Distribution
github.com/libtmux/libtmux-go/tmux
Source
tmux/poll.go

Description#

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: Pane.WaitForText polls the visible screen with the liveness and end-of-pane handling a bare condition lacks, and PaneObservation.WaitFor is woken by tmux as the pane writes. Server.WaitFor waits on tmux's separate wait-for channel.

Esc

Type to search.

Reference previewOpen reference