Connection.wait_for_notifications
The same, but waits for something to arrive.
Source and package
- Qualified name
-
libtmux::Connection:: wait _for _notifications - Namespace
- libtmux
- Declared in
Connection- Package
- libtmux-cxx
- Source
- include/libtmux/control.hpp
- [[
C++ nodiscard attributeAsks the compiler to warn when a result is discarded. An explicit cast to void acknowledges that the result is intentionally ignored.]] std::vector <Notification> wait_for_notifications( std::chrono:: deadline);steady _clock:: time _point -
Description#
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()orshutdown(), which report the failure. Events already buffered are returned without waiting at all.- Parameters