diff options
| author | Dave Parks <davep@lindenlab.com> | 2024-08-14 13:37:12 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-14 13:37:12 -0500 |
| commit | a52ba692a1810cc8883e2a2229cc243f800720c8 (patch) | |
| tree | cd043b840bdacdcb2d2486fdeebb369ffff65609 /indra/llcorehttp | |
| parent | b5e306f7d89e82984a37824a3640bd67a5c45d61 (diff) | |
| parent | 0ee528c5fdfa8d49ebd43774853880f1b2e352d8 (diff) | |
Merge pull request #2283 from RyeMutt/reduce-thread-contention
Reduce thread contention between main thread and asset fetch threads
Diffstat (limited to 'indra/llcorehttp')
| -rw-r--r-- | indra/llcorehttp/httprequest.cpp | 2 | ||||
| -rw-r--r-- | indra/llcorehttp/httpstats.h | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/indra/llcorehttp/httprequest.cpp b/indra/llcorehttp/httprequest.cpp index 216d407deb..2aaf71f8a4 100644 --- a/indra/llcorehttp/httprequest.cpp +++ b/indra/llcorehttp/httprequest.cpp @@ -489,6 +489,7 @@ HttpStatus HttpRequest::createService() HttpRequestQueue::init(); HttpRequestQueue * rq = HttpRequestQueue::instanceOf(); HttpService::init(rq); + HTTPStats::createInstance(); has_inited = true; } @@ -502,6 +503,7 @@ HttpStatus HttpRequest::destroyService() if (has_inited) { + HTTPStats::deleteSingleton(); HttpService::term(); HttpRequestQueue::term(); has_inited = false; diff --git a/indra/llcorehttp/httpstats.h b/indra/llcorehttp/httpstats.h index f12e59da0c..5c0f26d34e 100644 --- a/indra/llcorehttp/httpstats.h +++ b/indra/llcorehttp/httpstats.h @@ -35,12 +35,12 @@ namespace LLCore { - class HTTPStats : public LLSingleton<HTTPStats> + class HTTPStats final : public LLSimpleton<HTTPStats> { - LLSINGLETON(HTTPStats); - virtual ~HTTPStats(); - public: + HTTPStats(); + ~HTTPStats(); + void resetStats(); typedef LLStatsAccumulator StatsAccumulator; |
