always use eventfds for specific worker IO based worker notifications
Eventfds are pollable (no iow thread is blocked reading from the IO object) contrary to waitfds. And using pipes seams also rather excessive especially since we ensure that only a single notification is written before it is consumed. This makes the code of the IO-based sleep strategies easier and I would expect also faster.
Showing
- emper/sleep_strategy/AbstractIoSleepStrategy.cpp 24 additions, 9 deletionsemper/sleep_strategy/AbstractIoSleepStrategy.cpp
- emper/sleep_strategy/AbstractIoSleepStrategy.hpp 36 additions, 10 deletionsemper/sleep_strategy/AbstractIoSleepStrategy.hpp
- emper/sleep_strategy/PipeSleepStrategy.cpp 1 addition, 14 deletionsemper/sleep_strategy/PipeSleepStrategy.cpp
- emper/sleep_strategy/PipeSleepStrategy.hpp 2 additions, 18 deletionsemper/sleep_strategy/PipeSleepStrategy.hpp
- emper/sleep_strategy/WaitfdSleepStrategy.cpp 6 additions, 15 deletionsemper/sleep_strategy/WaitfdSleepStrategy.cpp
- emper/sleep_strategy/WaitfdSleepStrategy.hpp 0 additions, 14 deletionsemper/sleep_strategy/WaitfdSleepStrategy.hpp
Loading
Please register or sign in to comment