0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 16:22:35 +01:00

ircd:Ⓜ️:fetch: Fix context and object destructions; minor cleanup.

This commit is contained in:
Jason Volk 2020-03-16 13:37:46 -07:00
parent daea5cddef
commit 990d2346c4

View file

@ -81,11 +81,8 @@ ircd::m::fetch::backfill_limit_default
{ "default", 96L }, { "default", 96L },
}; };
decltype(ircd::m::fetch::request_context) decltype(ircd::m::fetch::dock)
ircd::m::fetch::request_context ircd::m::fetch::dock;
{
"m.fetch.req", 1_MiB, &request_worker, context::POST
};
decltype(ircd::m::fetch::requests) decltype(ircd::m::fetch::requests)
ircd::m::fetch::requests; ircd::m::fetch::requests;
@ -93,8 +90,14 @@ ircd::m::fetch::requests;
decltype(ircd::m::fetch::requests_mutex) decltype(ircd::m::fetch::requests_mutex)
ircd::m::fetch::requests_mutex; ircd::m::fetch::requests_mutex;
decltype(ircd::m::fetch::dock) decltype(ircd::m::fetch::request_context)
ircd::m::fetch::dock; ircd::m::fetch::request_context
{
"m.fetch.req",
1_MiB,
&request_worker,
context::POST
};
// //
// init // init
@ -102,6 +105,7 @@ ircd::m::fetch::dock;
ircd::m::fetch::init::init() ircd::m::fetch::init::init()
{ {
assert(requests.empty());
} }
ircd::m::fetch::init::~init() ircd::m::fetch::init::~init()
@ -110,7 +114,6 @@ noexcept
request_context.terminate(); request_context.terminate();
request_context.join(); request_context.join();
requests.clear(); requests.clear();
assert(requests.empty()); assert(requests.empty());
} }