summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/messaging/PrivateImplRef.h
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2010-05-13 18:54:39 +0000
committerAlan Conway <aconway@apache.org>2010-05-13 18:54:39 +0000
commit7e13897c9238d0e5a6a64df64eeddceb14c36002 (patch)
tree3e91072bbb28ba7f2403477b2c7f2f945cb3699c /cpp/src/qpid/messaging/PrivateImplRef.h
parent211eb170c15e6951f28e900e0ea8284e4e1456eb (diff)
downloadqpid-python-7e13897c9238d0e5a6a64df64eeddceb14c36002.tar.gz
Fix deadlocks & thread safety in new API classes.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@943973 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/messaging/PrivateImplRef.h')
-rw-r--r--cpp/src/qpid/messaging/PrivateImplRef.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/cpp/src/qpid/messaging/PrivateImplRef.h b/cpp/src/qpid/messaging/PrivateImplRef.h
index cc2798c647..e77c58d071 100644
--- a/cpp/src/qpid/messaging/PrivateImplRef.h
+++ b/cpp/src/qpid/messaging/PrivateImplRef.h
@@ -29,9 +29,7 @@
namespace qpid {
namespace messaging {
-// FIXME aconway 2009-04-24: details!
-/** @file
- *
+/**
* Helper class to implement a class with a private, reference counted
* implementation and reference semantics.
*
@@ -73,8 +71,10 @@ template <class T> class PrivateImplRef {
typedef typename T::Impl Impl;
typedef boost::intrusive_ptr<Impl> intrusive_ptr;
+ /** Get the implementation pointer from a handle */
static intrusive_ptr get(const T& t) { return intrusive_ptr(t.impl); }
+ /** Set the implementation pointer in a handle */
static void set(T& t, const intrusive_ptr& p) {
if (t.impl == p) return;
if (t.impl) boost::intrusive_ptr_release(t.impl);