summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/_httpreplyqueue.h
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2016-04-01 06:18:49 +0300
committerAndreyL ProductEngine <alihatskiy@productengine.com>2016-04-01 06:18:49 +0300
commit0ff6fa576a653597d0e9dda7f1de5f568e8d6829 (patch)
tree21e1b8f1253eedc1cc844553dcf46fef390d5a7d /indra/llcorehttp/_httpreplyqueue.h
parenta04341efaa63cd6bc47db25c1e4b4bf1e31d90a8 (diff)
parenteb413ec41e6ee49055464a636a73a7243c172c67 (diff)
Merged in lindenlab/viewer-bear
Diffstat (limited to 'indra/llcorehttp/_httpreplyqueue.h')
-rwxr-xr-xindra/llcorehttp/_httpreplyqueue.h23
1 files changed, 11 insertions, 12 deletions
diff --git a/indra/llcorehttp/_httpreplyqueue.h b/indra/llcorehttp/_httpreplyqueue.h
index 4220a09a3b..0e39e22dde 100755
--- a/indra/llcorehttp/_httpreplyqueue.h
+++ b/indra/llcorehttp/_httpreplyqueue.h
@@ -58,21 +58,19 @@ class HttpOperation;
/// will be coded anyway so it shouldn't be too much of a
/// burden.
-class HttpReplyQueue : public LLCoreInt::RefCounted
+class HttpReplyQueue : private boost::noncopyable
{
-public:
- /// Caller acquires a Refcount on construction
- HttpReplyQueue();
-protected:
- virtual ~HttpReplyQueue(); // Use release()
+public:
+ typedef boost::shared_ptr<HttpOperation> opPtr_t;
+ typedef boost::shared_ptr<HttpReplyQueue> ptr_t;
-private:
- HttpReplyQueue(const HttpReplyQueue &); // Not defined
- void operator=(const HttpReplyQueue &); // Not defined
+ HttpReplyQueue();
+ virtual ~HttpReplyQueue();
public:
- typedef std::vector<HttpOperation *> OpContainer;
+
+ typedef std::vector< opPtr_t > OpContainer;
/// Insert an object at the back of the reply queue.
///
@@ -80,7 +78,7 @@ public:
/// through the queue.
///
/// Threading: callable by any thread.
- void addOp(HttpOperation * op);
+ void addOp(const opPtr_t &op);
/// Fetch an operation from the head of the queue. Returns
/// NULL if none exists.
@@ -88,7 +86,7 @@ public:
/// Caller acquires reference count on returned operation.
///
/// Threading: callable by any thread.
- HttpOperation * fetchOp();
+ opPtr_t fetchOp();
/// Caller acquires reference count on each returned operation
///
@@ -96,6 +94,7 @@ public:
void fetchAll(OpContainer & ops);
protected:
+
OpContainer mQueue;
LLCoreInt::HttpMutex mQueueMutex;
LLCoreInt::HttpConditionVariable mQueueCV;