|
itch-mold-replay 1.0
Time-accurate NASDAQ TotalView-ITCH 5.0 replay over MoldUDP64
|
Owns N (num_feeds) retransmission feeds.
More...
#include <feed_pool.h>
Public Member Functions | |
| FeedPool (std::size_t num_feeds, const Feed::Config &feed_cfg, const PacketBuilder::Config &packet_builder_cfg, std::span< const char > file, const RetransmissionBuffer &retransmission_buffer) | |
Constructs and starts num_feeds retransmission feeds in their own threads. | |
| void | stop () const |
| Signals all feed threads to stop by writing to the shared shutdown_fd_. | |
Owns N (num_feeds) retransmission feeds.
Each feed runs own event loop in dedicated thread. All feeds share a single eventfd used to signal shutdown (via stop())
| imr::mold::retransmission::FeedPool::FeedPool | ( | std::size_t | num_feeds, |
| const Feed::Config & | feed_cfg, | ||
| const PacketBuilder::Config & | packet_builder_cfg, | ||
| std::span< const char > | file, | ||
| const RetransmissionBuffer & | retransmission_buffer | ||
| ) |
Constructs and starts num_feeds retransmission feeds in their own threads.
Each thread construct an instance of imr::mold::retransmission::Feed and then starts it immediately.
| std::system_error | if the shutdown eventfd fails to be created. |
| void imr::mold::retransmission::FeedPool::stop | ( | ) | const |
Signals all feed threads to stop by writing to the shared shutdown_fd_.
This is async so retransmission feeds meaning retransmission feeds might finish requests in their epoll set before receiving the shutdown signal
| std::system_error | if write() to shutdown_fd_ fails. |