diff options
author | Stephen D. Huston <shuston@apache.org> | 2010-05-07 15:05:45 +0000 |
---|---|---|
committer | Stephen D. Huston <shuston@apache.org> | 2010-05-07 15:05:45 +0000 |
commit | 680ade4d6648c554b39fa08ea1388d74a5731152 (patch) | |
tree | 93b539e7d3ea7c23e62d5ffba7ccaab8104bdb31 /cpp | |
parent | a378b7e59096ced0ee6f8e523af1c712524ebf1a (diff) | |
download | qpid-python-680ade4d6648c554b39fa08ea1388d74a5731152.tar.gz |
Keep dispatching the condition until it is cleared; resolves QPID-2587.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@942096 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/qpid/sys/windows/PollableCondition.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/cpp/src/qpid/sys/windows/PollableCondition.cpp b/cpp/src/qpid/sys/windows/PollableCondition.cpp index 5ccc136bd1..6a1d9045b4 100644 --- a/cpp/src/qpid/sys/windows/PollableCondition.cpp +++ b/cpp/src/qpid/sys/windows/PollableCondition.cpp @@ -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::PollableConditionPrivate(const sys::PollableCondition: 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::~PollableConditionPrivate() 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(windows::AsynchIoResult *result) { delete result; // Poller::monitorHandle() allocates this cb(parent); + if (isSet) + poke(); } /* PollableCondition */ |