summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/_httppolicy.h
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2012-06-23 23:33:50 -0400
committerMonty Brandenberg <monty@lindenlab.com>2012-06-23 23:33:50 -0400
commite172ec84fa217aae8d1e51c1e0673322c30891fe (patch)
tree7a9991fdcc625acba60a2eb205735baa0b9c1b9a /indra/llcorehttp/_httppolicy.h
parentbc7d5b24d16963a2715e880c518a4706a99f02fa (diff)
SH-3184/SH-3221 Improve cleanup, destructor, thread termination, etc. logic in library.
With this commit, the cleanup paths should be production quality. Unit tests have been expanded to include cases requiring thread termination and cleanup by the worker thread. Special operation/request added to support the unit tests. Thread interface expanded to include a very aggressive cancel() method that does not do cleanup but prevents the thread from accessing objects that will be destroyed.
Diffstat (limited to 'indra/llcorehttp/_httppolicy.h')
-rw-r--r--indra/llcorehttp/_httppolicy.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/indra/llcorehttp/_httppolicy.h b/indra/llcorehttp/_httppolicy.h
index c93279bc83..90bb3b571d 100644
--- a/indra/llcorehttp/_httppolicy.h
+++ b/indra/llcorehttp/_httppolicy.h
@@ -60,6 +60,17 @@ private:
void operator=(const HttpPolicy &); // Not defined
public:
+ /// Cancel all ready and retry requests sending them to
+ /// their notification queues. Release state resources
+ /// making further request handling impossible.
+ void shutdown();
+
+ /// Deliver policy definitions and enable handling of
+ /// requests. One-time call invoked before starting
+ /// the worker thread.
+ void start(const HttpPolicyGlobal & global,
+ const std::vector<HttpPolicyClass> & classes);
+
/// Give the policy layer some cycles to scan the ready
/// queue promoting higher-priority requests to active
/// as permited.
@@ -98,10 +109,6 @@ public:
return mGlobalOptions;
}
- void setPolicies(const HttpPolicyGlobal & global,
- const std::vector<HttpPolicyClass> & classes);
-
-
// Get ready counts for a particular class
int getReadyCount(HttpRequest::policy_t policy_class);