summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys/rdma/RdmaIO.cpp
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2010-06-14 14:50:16 +0000
committerAndrew Stitcher <astitcher@apache.org>2010-06-14 14:50:16 +0000
commit76013c074339252267579e6f17dd2db4894715cd (patch)
tree674cf7a55a0672a972007659be0a93bc70dd1810 /cpp/src/qpid/sys/rdma/RdmaIO.cpp
parent74572dd5127e644093f2820e59a2b27df1720618 (diff)
downloadqpid-python-76013c074339252267579e6f17dd2db4894715cd.tar.gz
In Rdma::AsynchIO::stop():
- make sure we stop the underlying handle immediately whether or not we do the stopped callback now or have to defer it. In qpid::client::RdmaConnector: - make sure that the shutdown handler is called under all circumstances. - make sure that the destructor doesn't delete the aio if it is already deleted git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@954492 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys/rdma/RdmaIO.cpp')
-rw-r--r--cpp/src/qpid/sys/rdma/RdmaIO.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/cpp/src/qpid/sys/rdma/RdmaIO.cpp b/cpp/src/qpid/sys/rdma/RdmaIO.cpp
index 32bd9cd96b..e91127ee7b 100644
--- a/cpp/src/qpid/sys/rdma/RdmaIO.cpp
+++ b/cpp/src/qpid/sys/rdma/RdmaIO.cpp
@@ -117,11 +117,14 @@ namespace Rdma {
newState = SHUTDOWN;
} while (!state.boolCompareAndSwap(oldState, newState));
+
+ // Ensure we can't get any more callbacks (except for the stopped callback)
+ dataHandle.stopWatch();
+
if (doReturn) {
notifyCallback = nc;
return;
}
- dataHandle.stopWatch();
// Callback, but don't store it - SHUTDOWN state means callback has been called
// we *are* allowed to delete the AsynchIO in this callback, so we have to return immediately
// after the callback
@@ -473,7 +476,6 @@ namespace Rdma {
}
void AsynchIO::doStoppedCallback() {
- dataHandle.stopWatch();
NotifyCallback nc;
nc.swap(notifyCallback);
// Transition unconditionally to SHUTDOWN