Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::MuxablePipePollState Struct Reference

#include <muxable-pipe.hh>

Public Types

using CommChannel

Public Member Functions

void poll (std::optional< unsigned int > timeout)
void iterate (std::set< CommChannel > &channels, fun< void(Descriptor fd, std::string_view data)> handleRead, fun< void(Descriptor fd)> handleEOF)

Public Attributes

std::vector< struct pollfd > pollStatus
std::map< int, size_t > fdToPollStatus

Detailed Description

Use pool() (Unix) / I/O Completion Ports (Windows) to wait for the input side of any logger pipe to become available'. Note that available' (i.e., non-blocking) includes EOF.

Member Typedef Documentation

◆ CommChannel

using nix::MuxablePipePollState::CommChannel
Initial value:
int Descriptor
Definition file-descriptor.hh:36

Member Function Documentation

◆ iterate()

void nix::MuxablePipePollState::iterate ( std::set< CommChannel > & channels,
fun< void(Descriptor fd, std::string_view data)> handleRead,
fun< void(Descriptor fd)> handleEOF )

Process for ready (Unix) / completed (Windows) operations, calling the callbacks as needed.

Parameters
handleReadcallback to be passed read data.
handleEOFcallback for when the MuxablePipe has closed.

◆ poll()

void nix::MuxablePipePollState::poll ( std::optional< unsigned int > timeout)

Check for ready (Unix) / completed (Windows) operations


The documentation for this struct was generated from the following files:
  • libutil/include/nix/util/muxable-pipe.hh
  • libutil/unix/muxable-pipe.cc
  • libutil/windows/muxable-pipe.cc