summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/qpid/broker/Queue.h
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/cpp/src/qpid/broker/Queue.h')
-rw-r--r--qpid/cpp/src/qpid/broker/Queue.h18
1 files changed, 2 insertions, 16 deletions
diff --git a/qpid/cpp/src/qpid/broker/Queue.h b/qpid/cpp/src/qpid/broker/Queue.h
index 0215870f90..3bcaf0f473 100644
--- a/qpid/cpp/src/qpid/broker/Queue.h
+++ b/qpid/cpp/src/qpid/broker/Queue.h
@@ -295,22 +295,8 @@ class Queue : public boost::enable_shared_from_this<Queue>,
: completionsNeeded(2), // one for register call, another for done call
cb(0) {}
- void dequeueDone()
- {
- assert(completionsNeeded.get() > 0);
- if (--completionsNeeded == 0) {
- assert(cb);
- (*cb)(ctxt);
- ctxt.reset();
- }
- }
-
- void registerCallback( callback *f, boost::intrusive_ptr<RefCounted>& _ctxt )
- {
- cb = f;
- ctxt = _ctxt;
- dequeueDone(); // invoke callback if dequeue already done.
- }
+ void dequeueDone();
+ void registerCallback( callback *f, boost::intrusive_ptr<RefCounted>& _ctxt );
private:
mutable qpid::sys::AtomicValue<int> completionsNeeded;