xgboost
公共成员函数 | 公共属性 | 所有成员列表
rabit::utils::PollHelper 结构体参考

用于执行 poll 的辅助数据结构 更多...

#include <poll_utils.h>

rabit::utils::PollHelper 的协作图
Collaboration graph

公共成员函数

void WatchRead (SOCKET fd)
 添加文件描述符以监视读取 更多...
 
void WatchRead (xgboost::collective::TCPSocket const &socket)
 
void WatchWrite (SOCKET fd)
 添加文件描述符以监视写入 更多...
 
void WatchWrite (xgboost::collective::TCPSocket const &socket)
 
void WatchException (SOCKET fd)
 添加文件描述符以监视异常 更多...
 
void WatchException (xgboost::collective::TCPSocket const &socket)
 
bool CheckRead (SOCKET fd) const
 检查描述符是否已准备好进行读取。 更多...
 
bool CheckRead (xgboost::collective::TCPSocket const &socket) const
 
bool CheckWrite (SOCKET fd) const
 检查描述符是否已准备好进行写入。 更多...
 
bool CheckWrite (xgboost::collective::TCPSocket const &socket) const
 
xgboost::collective::Result Poll (std::chrono::seconds timeout, bool check_error=true)
 对定义的集合执行 poll 操作,包括读取、写入、异常 更多...
 

公共属性

std::unordered_map< SOCKET, pollfd > fds
 

详细描述

用于执行 poll 的辅助数据结构

成员函数文档

◆ CheckRead() [1/2]

bool rabit::utils::PollHelper::CheckRead ( SOCKET  fd) const
inline

检查描述符是否已准备好进行读取。

参数
fd要检查状态的文件描述符

◆ CheckRead() [2/2]

bool rabit::utils::PollHelper::CheckRead ( xgboost::collective::TCPSocket const &  socket) const
inline

◆ CheckWrite() [1/2]

bool rabit::utils::PollHelper::CheckWrite ( SOCKET  fd) const
inline

检查描述符是否已准备好进行写入。

参数
fd要检查状态的文件描述符

◆ CheckWrite() [2/2]

bool rabit::utils::PollHelper::CheckWrite ( xgboost::collective::TCPSocket const &  socket) const
inline

◆ Poll()

xgboost::collective::Result rabit::utils::PollHelper::Poll ( std::chrono::seconds  timeout,
bool  check_error = true 
)
inline

对定义的集合执行 poll 操作,包括读取、写入、异常

参数
timeout指定超时时间(秒)。如果为负数则阻塞。

◆ WatchException() [1/2]

void rabit::utils::PollHelper::WatchException ( SOCKET  fd)
inline

添加文件描述符以监视异常

参数
fd要监视的文件描述符

◆ WatchException() [2/2]

void rabit::utils::PollHelper::WatchException ( xgboost::collective::TCPSocket const &  socket)
inline

◆ WatchRead() [1/2]

void rabit::utils::PollHelper::WatchRead ( SOCKET  fd)
inline

添加文件描述符以监视读取

参数
fd要监视的文件描述符

◆ WatchRead() [2/2]

void rabit::utils::PollHelper::WatchRead ( xgboost::collective::TCPSocket const &  socket)
inline

◆ WatchWrite() [1/2]

void rabit::utils::PollHelper::WatchWrite ( SOCKET  fd)
inline

添加文件描述符以监视写入

参数
fd要监视的文件描述符

◆ WatchWrite() [2/2]

void rabit::utils::PollHelper::WatchWrite ( xgboost::collective::TCPSocket const &  socket)
inline

成员数据文档

◆ fds

std::unordered_map<SOCKET, pollfd> rabit::utils::PollHelper::fds

此结构体的文档生成自以下文件