EventSubscription.stream
The steps still to come, in order, each read by the thread consuming the stream.
Source and package
- Module
- io.github.libtmux.control
- Declared in
- EventSubscription
- Package
- io.github.libtmux:libtmux
- Source
- libtmux/src/main/java/io/github/libtmux/control/EventSubscription.java
- stream ( ) java
.util <Delivery<T>>.stream .Stream -
Description#
Pull-only: a step is read when the stream asks for one, and events that arrive meanwhile wait in this subscription's buffer, so its capacity alone decides what becomes a
Delivery.Gap. The stream ends when this subscription closes. When the control client ended it, the stream fails with#cause(). Closing the stream closes this subscription, and closing this subscription from another thread ends a stream that is waiting.Examples#
try (Stream<Delivery<PaneOutput>> steps = subscription.stream()) {steps.map(Delivery::kept).forEach(output -> System.out.print(output.data()));}- Raises
-
-
io
.github – from the stream if the reading thread is interrupted; its interrupt status is set again.libtmux .exception .Lib Tmux Exception
-