Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooFit::MultiProcess::Poller Class Reference

Waits for input on a set of registered Channels.

Replacement for the ZeroMQPoller: channels get a stable index in registration order, poll() returns the indices of the channels that have input available, and channels can be unregistered without changing the indices of the others.

The Poller stores plain pointers, so registered Channel objects must stay at their memory location while the Poller is in use.

Definition at line 34 of file Poller.h.

Public Member Functions

std::vector< std::size_t > poll (int timeout_ms=-1) const
 Wait for input; returns the registration indices of readable channels.
 
std::size_t register_channel (const Channel &channel)
 Register a channel for input polling; returns its stable index.
 
std::size_t size () const
 
void unregister_channel (const Channel &channel)
 

Private Attributes

std::vector< std::pair< std::size_t, const Channel * > > entries_
 
std::size_t next_index_ = 0
 

#include </github/home/ROOT-CI/src/roofit/multiprocess/res/RooFit/MultiProcess/Poller.h>

Member Function Documentation

◆ poll()

std::vector< std::size_t > RooFit::MultiProcess::Poller::poll ( int timeout_ms = -1) const
inline

Wait for input; returns the registration indices of readable channels.

Throws ppoll_error_t with num() == EINTR when a SIGTERM was received.

Definition at line 58 of file Poller.h.

◆ register_channel()

std::size_t RooFit::MultiProcess::Poller::register_channel ( const Channel & channel)
inline

Register a channel for input polling; returns its stable index.

Definition at line 37 of file Poller.h.

◆ size()

std::size_t RooFit::MultiProcess::Poller::size ( ) const
inline

Definition at line 54 of file Poller.h.

◆ unregister_channel()

void RooFit::MultiProcess::Poller::unregister_channel ( const Channel & channel)
inline

Definition at line 43 of file Poller.h.

Member Data Documentation

◆ entries_

std::vector<std::pair<std::size_t, const Channel *> > RooFit::MultiProcess::Poller::entries_
private

Definition at line 76 of file Poller.h.

◆ next_index_

std::size_t RooFit::MultiProcess::Poller::next_index_ = 0
private

Definition at line 77 of file Poller.h.

  • roofit/multiprocess/res/RooFit/MultiProcess/Poller.h