0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-27 07:54:05 +01:00

ircd:Ⓜ️:typing: Ensure termination of timeout worker on unload.

This commit is contained in:
Jason Volk 2020-02-26 14:46:27 -08:00
parent a48e481a44
commit 0c896d7c58

View file

@ -321,14 +321,21 @@ ircd::m::typing::for_each(const closure &closure)
static void timeout_timeout(const typist &);
static bool timeout_check();
static void timeout_worker();
context timeout_context
static context timeout_context
{
"typing",
256_KiB,
context::POST,
context::POST | context::WAIT_JOIN,
timeout_worker
};
static void
__attribute__((destructor))
timeout_terminate()
{
timeout_context.terminate();
}
void
__attribute__((noreturn))
timeout_worker()