diff options
author | Andrew Stitcher <astitcher@apache.org> | 2007-08-02 16:41:06 +0000 |
---|---|---|
committer | Andrew Stitcher <astitcher@apache.org> | 2007-08-02 16:41:06 +0000 |
commit | 2290d4ed915f1202bcd6cd50b1a85f27f3eb6cd2 (patch) | |
tree | 087697531f0fa4d56705f72b041b17858f8e8100 /cpp/src/qpid/broker/BrokerQueue.cpp | |
parent | 9a6a98eac19196055e0efa24daa8742769256ec7 (diff) | |
download | qpid-python-2290d4ed915f1202bcd6cd50b1a85f27f3eb6cd2.tar.gz |
* Changed Broker queue processing to avoid unnecessary uses of boost::bind
* Changed Serializer::execute to take Tasks by reference to avoid overhead of copying
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@562179 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/BrokerQueue.cpp')
-rw-r--r-- | cpp/src/qpid/broker/BrokerQueue.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cpp/src/qpid/broker/BrokerQueue.cpp b/cpp/src/qpid/broker/BrokerQueue.cpp index f8bffa01a3..3d4d6b83be 100644 --- a/cpp/src/qpid/broker/BrokerQueue.cpp +++ b/cpp/src/qpid/broker/BrokerQueue.cpp @@ -49,7 +49,8 @@ Queue::Queue(const string& _name, bool _autodelete, next(0), exclusive(0), persistenceId(0), - serializer(false) + serializer(false), + dispatchCallback(boost::bind(&Queue::dispatch, this)) { } @@ -79,7 +80,7 @@ void Queue::recover(Message::shared_ptr& msg){ void Queue::process(Message::shared_ptr& msg){ push(msg); - serializer.execute(boost::bind(&Queue::dispatch, this)); + serializer.execute(dispatchCallback); } @@ -89,13 +90,13 @@ void Queue::requeue(Message::shared_ptr& msg){ Mutex::ScopedLock locker(messageLock); messages.push_front(msg); } - serializer.execute(boost::bind(&Queue::dispatch, this)); + serializer.execute(dispatchCallback); } void Queue::requestDispatch(){ - serializer.execute(boost::bind(&Queue::dispatch, this)); + serializer.execute(dispatchCallback); } |