Core Library0.xAPI reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

MoreLess about this notice

class libtmux-java

ProcessTransport.StdoutPump

Reads standard output without ever blocking on the pipe.

Source and package
Qualified name
io.github.libtmux.transport.ProcessTransport.StdoutPump
Package
io.github.libtmux.transport
Declared in
ProcessTransport
Distribution
io.github.libtmux:libtmux
Source
libtmux/src/main/java/io/github/libtmux/transport/ProcessTransport.java
class io.github.libtmux.transport.ProcessTransport.StdoutPump ( process: Process, limit: int, finished: CountDownLatch, failure: CompletableFuture<Throwable>, killedByClose: BooleanSupplier )

Description

A read that blocks is a thread nothing can wake: tmux 3.0 and 3.1 daemons keep the client's standard output open after the client has exited, and closing the stream does not end a read already waiting in it. So this reads what is there and waits only while the process is alive. Once it has exited, everything it wrote is already in the pipe, so the pump reads while bytes are waiting and finishes at the first moment none are — a decision on the pipe's contents, not on a clock, which cannot drop bytes however long the pump was starved of a CPU.

Members6 members

Esc
Search in

Type to search.

Reference previewOpen reference