Nix 2.26.3
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, std::function< void(Descriptor fd, std::string_view data)> handleRead, std::function< void(Descriptor fd)> handleEOF)
 

Public Attributes

std::vector< struct pollfd > pollStatus
 
std::map< int, size_tfdToPollStatus
 

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:20

Member Function Documentation

◆ iterate()

void nix::MuxablePipePollState::iterate ( std::set< CommChannel > & channels,
std::function< void(Descriptor fd, std::string_view data)> handleRead,
std::function< 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 file: