Page MenuHomePhabricator

MainLoop: Add unit tests
ClosedPublic

Authored by labath on May 2 2017, 9:53 AM.

Details

Summary

This adds a couple of unit tests to the MainLoop class. To get the
kqueue based version of the signal handling passing, I needed to
modify the implementation a bit to make the queue object persistent.
Otherwise, only the signals which are send during the Run call would get
processed, which did not match the ppoll behaviour.

I also took the opportunity to remove the ForEach template functions and
replace them with something more reasonable.

Event Timeline

labath created this revision.May 2 2017, 9:53 AM
eugene accepted this revision.May 3 2017, 7:37 PM
eugene added inline comments.
source/Host/common/MainLoop.cpp
66

Could you please add here a comment describing when kqueue/pselect/ppoll are used.

This revision is now accepted and ready to land.May 3 2017, 7:37 PM
This revision was automatically updated to reflect the committed changes.