summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/_httpreplyqueue.cpp
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2012-07-10 18:50:21 -0400
committerMonty Brandenberg <monty@lindenlab.com>2012-07-10 18:50:21 -0400
commitbc72acbfd2410e01946375bcfa29cf37a7c01c17 (patch)
treeeaf3f52239c4194a51e4f0b047d436395a77921a /indra/llcorehttp/_httpreplyqueue.cpp
parenta5ba9c0eb327d2fb38a39560a34712e844a71a79 (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.cpp20
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