iosource: Make poll intervals configurable

This probably should not be changed by users, but it's useful for
testing and experimentation rather than needing to recompile.

Processing 100 packets without checking an FD based IO source can
actually mean that FD based sources are never checked during a read
of a very small pcap...
This commit is contained in:
Arne Welzel 2023-03-17 21:20:52 +01:00
parent 5f1a85803a
commit 46c432dc8b
4 changed files with 35 additions and 6 deletions

View file

@ -216,7 +216,7 @@ private:
int zero_timeout_count = 0;
WakeupHandler* wakeup = nullptr;
int poll_counter = 0;
int poll_interval = 100;
int poll_interval = 0; // Set in InitPostScript() based on const value.
int event_queue = -1;
std::map<int, IOSource*> fd_map;