diff options
author | Monty Brandenberg <monty@lindenlab.com> | 2012-07-10 18:50:21 -0400 |
---|---|---|
committer | Monty Brandenberg <monty@lindenlab.com> | 2012-07-10 18:50:21 -0400 |
commit | bc72acbfd2410e01946375bcfa29cf37a7c01c17 (patch) | |
tree | eaf3f52239c4194a51e4f0b047d436395a77921a /indra/llcorehttp/_httpreplyqueue.cpp | |
parent | a5ba9c0eb327d2fb38a39560a34712e844a71a79 (diff) |
SH-3244 Syscall avoidance in HttpRequest::update() method
Well, achieved that by doing work in bulk when needed. But
turned into some additional things. Change timebase from
mS to uS as, well, things are headed that way. Implement
an HttpReplyQueue::fetchAll method (advertised one, hadn't
implemented it).
Diffstat (limited to 'indra/llcorehttp/_httpreplyqueue.cpp')
-rw-r--r-- | indra/llcorehttp/_httpreplyqueue.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/indra/llcorehttp/_httpreplyqueue.cpp b/indra/llcorehttp/_httpreplyqueue.cpp index a354ed7e10..558b7bdee9 100644 --- a/indra/llcorehttp/_httpreplyqueue.cpp +++ b/indra/llcorehttp/_httpreplyqueue.cpp @@ -84,4 +84,24 @@ HttpOperation * HttpReplyQueue::fetchOp() return result; } + +void HttpReplyQueue::fetchAll(OpContainer & ops) +{ + // Not valid putting something back on the queue... + llassert_always(ops.empty()); + + { + HttpScopedLock lock(mQueueMutex); + + if (! mQueue.empty()) + { + mQueue.swap(ops); + } + } + + // Caller also acquires the reference counts on each op. + return; +} + + } // end namespace LLCore |