Author: shuston Date: Fri May 7 15:05:45 2010 New Revision: 942096 URL: http://svn.apache.org/viewvc?rev=942096&view=rev Log: Keep dispatching the condition until it is cleared; resolves QPID-2587.
Modified: qpid/trunk/qpid/cpp/src/qpid/sys/windows/PollableCondition.cpp Modified: qpid/trunk/qpid/cpp/src/qpid/sys/windows/PollableCondition.cpp URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/windows/PollableCondition.cpp?rev=942096&r1=942095&r2=942096&view=diff ============================================================================== --- qpid/trunk/qpid/cpp/src/qpid/sys/windows/PollableCondition.cpp (original) +++ qpid/trunk/qpid/cpp/src/qpid/sys/windows/PollableCondition.cpp Fri May 7 15:05:45 2010 @@ -55,7 +55,6 @@ private: PollableCondition& parent; boost::shared_ptr<sys::Poller> poller; LONG isSet; - LONG armed; }; PollableConditionPrivate::PollableConditionPrivate(const sys::PollableCondition::Callback& cb, @@ -63,7 +62,7 @@ PollableConditionPrivate::PollableCondit const boost::shared_ptr<sys::Poller>& poller) : IOHandle(new sys::IOHandlePrivate(INVALID_SOCKET, boost::bind(&PollableConditionPrivate::dispatch, this, _1))), - cb(cb), parent(parent), poller(poller), isSet(0), armed(0) + cb(cb), parent(parent), poller(poller), isSet(0) { } @@ -73,9 +72,6 @@ PollableConditionPrivate::~PollableCondi void PollableConditionPrivate::poke() { - if (!armed) - return; - // monitorHandle will queue a completion for the IOCP; when it's handled, a // poller thread will call back to dispatch() below. PollerHandle ph(*this); @@ -86,6 +82,8 @@ void PollableConditionPrivate::dispatch( { delete result; // Poller::monitorHandle() allocates this cb(parent); + if (isSet) + poke(); } /* PollableCondition */ --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:commits-subscr...@qpid.apache.org