# tmux.ControlClient.NextNotification

- **Module:** tmux.ControlClient
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-go/blob/52968a3181c1c9e6d1b26c565d4b170968ae61c0/tmux/control_stream.go#L23
- **Page:** https://libtmux.org/en/go/latest/reference/tmux-controlclient-nextnotification/

```
tmux.ControlClient.NextNotification(ctx: context.Context) -> (ControlNotification, error)
```

NextNotification returns the next ordered control-mode notification. Exactly one caller may execute it at a time. Close releases the queue and makes subsequent reads report os.ErrClosed, drained through queued notifications first. Natural process exit before a caller asked to close instead reports [ErrControlStreamLost] - 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 reporting [ControlNotificationOverflowError].
