Core LibraryalphaAPI Reference

Choose documentation 3

latest

Current version

latest
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

class libtmux-java latest

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#

Esc

Type to search.

Reference preview Open reference