summaryrefslogtreecommitdiff
path: root/indra/llcommon/llthreadsafequeue.cpp
diff options
context:
space:
mode:
authorLogan Dethrow <log@lindenlab.com>2011-09-07 16:40:40 -0400
committerLogan Dethrow <log@lindenlab.com>2011-09-07 16:40:40 -0400
commitb8fddce34d1737acf32d83dac423dbb7a948cc4a (patch)
treeadf4c05ab3a42b2d3fed8fbda23c2de97840bab7 /indra/llcommon/llthreadsafequeue.cpp
parentf73b795bb709b3060e06b4238ae4dac702f21301 (diff)
parent82b1b1bc6ee91e1778a16634fb9e2988da23fd71 (diff)
Merge. Fixed issue with LLProxy code related to changes to the LLSocket interface.
Diffstat (limited to 'indra/llcommon/llthreadsafequeue.cpp')
-rw-r--r--indra/llcommon/llthreadsafequeue.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/indra/llcommon/llthreadsafequeue.cpp b/indra/llcommon/llthreadsafequeue.cpp
index 8a73e632a9..05d24944f3 100644
--- a/indra/llcommon/llthreadsafequeue.cpp
+++ b/indra/llcommon/llthreadsafequeue.cpp
@@ -34,19 +34,11 @@
//-----------------------------------------------------------------------------
-LLThreadSafeQueueImplementation::LLThreadSafeQueueImplementation(apr_pool_t * pool, unsigned int capacity):
- mOwnsPool(pool == 0),
- mPool(pool),
+LLThreadSafeQueueImplementation::LLThreadSafeQueueImplementation(unsigned int capacity):
mQueue(0)
{
- if(mOwnsPool) {
- apr_status_t status = apr_pool_create(&mPool, 0);
- if(status != APR_SUCCESS) throw LLThreadSafeQueueError("failed to allocate pool");
- } else {
- ; // No op.
- }
-
- apr_status_t status = apr_queue_create(&mQueue, capacity, mPool);
+ mPool.create();
+ apr_status_t status = apr_queue_create(&mQueue, capacity, mPool());
if(status != APR_SUCCESS) throw LLThreadSafeQueueError("failed to allocate queue");
}
@@ -59,7 +51,6 @@ LLThreadSafeQueueImplementation::~LLThreadSafeQueueImplementation()
" elements;" << "memory will be leaked" << LL_ENDL;
apr_queue_term(mQueue);
}
- if(mOwnsPool && (mPool != 0)) apr_pool_destroy(mPool);
}