Review Board 1.7.22


QPID-3571 Portable Poller implememtation for Posix systems

Review Request #3386 - Created Jan. 4, 2012 and updated

Cliff Jansen
QPID-3571
Reviewers
qpid
astitcher, shuston, tross
qpid
Portable qpid::sys::Poller implementation for Posix systems.

Modelled as closely as possible to the EpollPoller implementation.
linux

solaris (x86, sparc, gcc, native sunstudio compilers)
Posted (Jan. 5, 2012, 12:41 a.m.)
Nit... there are a few trailing spaces, noted by red in the review diff.

There's a qpid/sys/PipeHandle.h that you may be able to use in the SignalPipe class, though there may not be too much benefit to that.

In EventStream::next, does the wait on serializer decrease the timeout? If not, the wait may end up longer than the caller requested.

Other than that, it's good!
  1. Steve, thanks very much for your time reviewing this code... several times!
    
    I will fix the spaces :-)
    
    The timeout (qpid::sys::Duration) is converted to an absolute time (targetTimeout) prior to entering the loop.  The targetTimeout does not need further adjusting from within the loop.
    
    The pre-existing PipeHandle class exposes read and write calls on the pipe whereas the poller's SignalPipe hides them (in order to minimize them).  The remaining overlap between them is very small, so I don't think there is much to be gained by trying to re-jig either one.