qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Conway <acon...@redhat.com>
Subject C++ broker: Polling for non-IO events.
Date Thu, 11 Sep 2008 13:13:09 GMT
FYI: I've added 2 classes to poll for non-IO events in the broker's

sys/PollableCondition: is a generic mechansim to poll for non-IO
events in the Poller. 

sys/PollableQueue: is a thread-safe queue template that can be
dispatched from the Poller when there are items on the queue. It uses

I'm using these in the cluster code to queue cluster events for dispatch
by the poller.

PollableCondition is implemented using a pipe which is portable for
Unixen but a bit ugly. There's a better linux solution using eventfd()
on modern linux, and I'm sure the Solaris event framework has something
similar, we can add platform-specific improvements as we see fit. Sorry
about windows - currently this is only used by cluster code which won't
run on windows yet anyway so it can just be left out of windows builds
for now. I expect it may find other uses with time.


View raw message