libtmux Reference MCP Search
On this page

libtmux::Connection::wait_for_notifications

View as Markdown

Module
libtmux
Declared in
Connection
Package
libtmux-cxx
Source
include/libtmux/control.hpp
wait_for_notifications ( deadline : std::chrono::steady_clock::time_point ) std::vector< Notification >
method [source]
method [source]
wait_for_notifications

The same, but waits for something to arrive.

take_notifications returns immediately, so a caller reacting to tmux had to call it in a loop and sleep between — which either wakes too often or reacts too late, and picks that trade with no idea how long the next event will take. This blocks until at least one event is available, the connection fails, or the deadline passes, and returns whatever it has.

An empty result means the deadline passed or the stream ended; the two are told apart by asking execute or shutdown , which report the failure. Events already buffered are returned without waiting at all.

0 declared, 0 inherited

Esc

Type to search.