diff options
| author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-04-01 08:35:38 -0400 |
|---|---|---|
| committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-04-01 08:35:38 -0400 |
| commit | caf4f494378558df14738f2e11b20f0c03674764 (patch) | |
| tree | c8994793b992960a76a69516bc4891228a684afd /indra/llcorehttp/_httpreplyqueue.h | |
| parent | 9c5d0d6152caff914a6f0159ba4f2382915d4055 (diff) | |
| parent | 18928ea6c6f2830a0d45ec412c915eceff1b76b0 (diff) | |
merge
Diffstat (limited to 'indra/llcorehttp/_httpreplyqueue.h')
| -rwxr-xr-x | indra/llcorehttp/_httpreplyqueue.h | 23 |
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; |
