Core LibraryalphaAPI 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.

method libtmux-cxx latest

CommandRuntime.ready_fd

Readable exactly when wait_ready() would return without blocking, for a caller that owns an event loop and cannot park a thread in wait_ready().

Source and package
Qualified name
libtmux::CommandRuntime::ready_fd
Namespace
libtmux
Declared in
CommandRuntime
Package
libtmux-cxx
Source
include/libtmux/async.hpp
[[C++ nodiscard attributeAsks the compiler to warn when a result is discarded. An explicit cast to void acknowledges that the result is intentionally ignored.Language documentation]] int ready_fd() const noexcept;

Description#

The same contract as Connection::notification_fd():

Readability is the signal. Do not read from it: the byte carries nothing and is this runtime's to consume. Drain by taking the work — dispatch_ready() or discard_ready() — which clears it.

A closed runtime makes it readable, so a poller learns that no answer is coming rather than waiting for one.

Valid until this runtime is destroyed or moved from. -1 when the pipe could not be created, and on Windows, where the runtime has no descriptor to offer; a caller that gets -1 uses wait_ready().

Esc

Type to search.

Reference previewOpen reference