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.

class libtmux-java latest

Channel

One of tmux's wait-for channels, named once.

Source and package
Qualified name
io.github.libtmux.Channel
Package
io.github.libtmux
Distribution
io.github.libtmux:libtmux
Source
libtmux/src/main/java/io/github/libtmux/Channel.java
class io.github.libtmux.Channel

Description#

A channel is server-wide and shared by everything on it, including programs running in panes. Nothing creates or destroys one: a name either has a signal remembered against it or does not.

tmux's own wait-for has two traps, and this exists to close both. It exits successfully when the server dies under the waiter, which is indistinguishable from a real signal, so the server is checked afterwards rather than believed. And a signal sent when nobody is waiting is remembered, satisfying the next wait whenever that happens — possibly in a later run of a different program — so #drain() is how a caller starts from a known state on a channel whose history is not its own.

Members7#

Common operations2#

  • drain method Consumes a signal already waiting, so a stale one cannot satisfy a later wait.
  • signal method Signals the channel, waking one waiter, or being remembered until something waits.

Other members5#

  • await method Waits for something to signal the channel.
  • awaitReservingCapacity method Waits while preserving process capacity for a call through this server that signals it.
  • Channel method
  • name method The name this channel is known by on its server.
  • toString method
Esc

Type to search.

Reference previewOpen reference