diff options
author | Alan Conway <aconway@apache.org> | 2007-12-06 18:22:17 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2007-12-06 18:22:17 +0000 |
commit | 430e644a4a647c256ae51682d7230c35d954073e (patch) | |
tree | ef03ef6d4f1e1d7451bf26b943a325e425ef2b58 /cpp/src/qpid/broker/DtxManager.cpp | |
parent | 8a3e8a01188a500401196601d78ecf146ab8ba66 (diff) | |
download | qpid-python-430e644a4a647c256ae51682d7230c35d954073e.tar.gz |
Removed redundant TimerA, use intrusive_ptr for Timer.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@601803 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/DtxManager.cpp')
-rw-r--r-- | cpp/src/qpid/broker/DtxManager.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cpp/src/qpid/broker/DtxManager.cpp b/cpp/src/qpid/broker/DtxManager.cpp index 1d8b64eb5b..039a52cf2c 100644 --- a/cpp/src/qpid/broker/DtxManager.cpp +++ b/cpp/src/qpid/broker/DtxManager.cpp @@ -119,12 +119,12 @@ DtxWorkRecord* DtxManager::createWork(std::string xid) void DtxManager::setTimeout(const std::string& xid, uint32_t secs) { DtxWorkRecord* record = getWork(xid); - DtxTimeout::shared_ptr timeout = record->getTimeout(); + intrusive_ptr<DtxTimeout> timeout = record->getTimeout(); if (timeout.get()) { if (timeout->timeout == secs) return;//no need to do anything further if timeout hasn't changed timeout->cancelled = true; } - timeout = DtxTimeout::shared_ptr(new DtxTimeout(secs, *this, xid)); + timeout = intrusive_ptr<DtxTimeout>(new DtxTimeout(secs, *this, xid)); record->setTimeout(timeout); timer.add(boost::static_pointer_cast<TimerTask>(timeout)); @@ -132,7 +132,7 @@ void DtxManager::setTimeout(const std::string& xid, uint32_t secs) uint32_t DtxManager::getTimeout(const std::string& xid) { - DtxTimeout::shared_ptr timeout = getWork(xid)->getTimeout(); + intrusive_ptr<DtxTimeout> timeout = getWork(xid)->getTimeout(); return !timeout ? 0 : timeout->timeout; } @@ -145,7 +145,7 @@ void DtxManager::timedout(const std::string& xid) } else { get_pointer(i)->timedout(); //TODO: do we want to have a timed task to cleanup, or can we rely on an explicit completion? - //timer.add(TimerTask::shared_ptr(new DtxCleanup(60*30/*30 mins*/, *this, xid))); + //timer.add(intrusive_ptr<TimerTask>(new DtxCleanup(60*30/*30 mins*/, *this, xid))); } } |