ControlClient.NextNotification
NextNotification returns the next ordered control-mode notification. Concurrent calls are serialized, as for PaneObservation.NextNotification: each notification goes to exactly one call, in order, and a call waiting its turn returns when ctx ends.
Source and package
- Qualified name
-
tmux.Control Client. Next Notification - Package
- tmux
- Declared in
ControlClient- Distribution
- github.com/libtmux/libtmux-go/tmux
- Source
- tmux/control_stream.go
- func (c *Control
Client ) NextNotification( ctx context.Context , ) (ControlNotification , error) -
Description#
Every end of the client matches
ErrControlClosed. Close releases the queue and makes subsequent reads report an error matching bothErrControlClosedandos.ErrClosed. Natural process exit before a caller asked to close instead reports an error matching bothErrControlClosedandErrControlStreamLost- most often because the server the underlying tmux client was attached to exited - naming the tmux exit reason when one was sent. A terminal reader error follows notifications queued before that failure. A full bounded queue likewise drains before reportingControlNotificationOverflowError, which does not matchErrControlClosed: the process is still running, and the caller decides to close it.- Parameters