diff options
author | Andrew Stitcher <astitcher@apache.org> | 2009-05-04 15:55:21 +0000 |
---|---|---|
committer | Andrew Stitcher <astitcher@apache.org> | 2009-05-04 15:55:21 +0000 |
commit | 564d179640cf49feeb8ff84133f892499afb0e65 (patch) | |
tree | d6fb4c2f2c789379937c2b622772cea2aed69e1d /cpp/src/qpid/sys/posix/AsynchIO.cpp | |
parent | c912884c11debf57e8c154fba7dbbcae8ea34d90 (diff) | |
download | qpid-python-564d179640cf49feeb8ff84133f892499afb0e65.tar.gz |
Refactored the DispatchHandle/Poller code to remove a long standing
set of race conditions.
- Changed Poller naming for better clarity with
new semantics.
- Changed Poller semantics to avoid DispatchHandle
keeping so much state
- Changed Poller so that it will never re-enable a
Handle until Poller::wait is called again on the same thread
that returned the Handle.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@771338 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys/posix/AsynchIO.cpp')
-rw-r--r-- | cpp/src/qpid/sys/posix/AsynchIO.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cpp/src/qpid/sys/posix/AsynchIO.cpp b/cpp/src/qpid/sys/posix/AsynchIO.cpp index a914dc817a..ecfed6b42a 100644 --- a/cpp/src/qpid/sys/posix/AsynchIO.cpp +++ b/cpp/src/qpid/sys/posix/AsynchIO.cpp @@ -75,6 +75,7 @@ namespace sys { class AsynchAcceptorPrivate { public: AsynchAcceptorPrivate(const Socket& s, AsynchAcceptor::Callback callback); + ~AsynchAcceptorPrivate(); void start(Poller::shared_ptr poller); private: @@ -109,6 +110,10 @@ AsynchAcceptorPrivate::AsynchAcceptorPrivate(const Socket& s, s.setNonblocking(); } +AsynchAcceptorPrivate::~AsynchAcceptorPrivate() { + handle.stopWatch(); +} + void AsynchAcceptorPrivate::start(Poller::shared_ptr poller) { handle.startWatch(poller); } |