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.
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>
|
inline |
Wait for input; returns the registration indices of readable channels.
Throws ppoll_error_t with num() == EINTR when a SIGTERM was received.
|
inline |
|
private |