From a5e401ebea6e4fcc3012065616d8071af244b303 Mon Sep 17 00:00:00 2001 From: norohind <60548839+norohind@users.noreply.github.com> Date: Sun, 10 Apr 2022 23:17:13 +0300 Subject: [PATCH] Human friendly names for hooks threads --- HookSystem.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/HookSystem.py b/HookSystem.py index a3a1e2f..f246ebe 100644 --- a/HookSystem.py +++ b/HookSystem.py @@ -55,4 +55,8 @@ class HookSystem: @staticmethod def _notify(operation_id, hooks: list[Hook]) -> None: for hook in hooks: - threading.Thread(target=hook.update, args=(operation_id,)).start() + threading.Thread( + name=f'hook-{hook.__class__.__name__}-{operation_id}', + target=hook.update, + args=(operation_id,) + ).start()