diff options
| author | Andrew Stitcher <astitcher@apache.org> | 2010-09-08 16:49:47 +0000 |
|---|---|---|
| committer | Andrew Stitcher <astitcher@apache.org> | 2010-09-08 16:49:47 +0000 |
| commit | fd899eebc640d7e3c72ee71282936fd138ee1378 (patch) | |
| tree | 0fdf5f42073d61ef644bf199a5dd7c21166a4b2a /cpp/src/qpid/sys/rdma/RdmaIO.cpp | |
| parent | fe43eb372cfe6a2812f46b5d19e853b3724ac3a1 (diff) | |
| download | qpid-python-fd899eebc640d7e3c72ee71282936fd138ee1378.tar.gz | |
Delay daemon side Rdma connection disconnect() so that it happens serialised
to the data channel for the connection.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@995143 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys/rdma/RdmaIO.cpp')
| -rw-r--r-- | cpp/src/qpid/sys/rdma/RdmaIO.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cpp/src/qpid/sys/rdma/RdmaIO.cpp b/cpp/src/qpid/sys/rdma/RdmaIO.cpp index 068e8cf187..c89e0f2126 100644 --- a/cpp/src/qpid/sys/rdma/RdmaIO.cpp +++ b/cpp/src/qpid/sys/rdma/RdmaIO.cpp @@ -114,6 +114,20 @@ namespace Rdma { nc(*this); } + namespace { + void requestedCall(AsynchIO* aio, AsynchIO::RequestCallback callback) { + assert(callback); + callback(*aio); + } + } + + void AsynchIO::requestCallback(RequestCallback callback) { + // TODO creating a function object every time isn't all that + // efficient - if this becomes heavily used do something better (what?) + assert(callback); + dataHandle.call(boost::bind(&requestedCall, this, callback)); + } + // Mark writing closed (so we don't accept any more writes or make any idle callbacks) void AsynchIO::drainWriteQueue(NotifyCallback nc) { State oldState; |
