Set a name for dispatcher runtime's threads

It defaults to "tokio-runtime-worker", which is not descriptive.
This commit is contained in:
Ilya Bizyaev 2024-12-14 14:46:57 +01:00
parent 94db1757dc
commit 91e162a9b9
No known key found for this signature in database
GPG key ID: 29AACC9F9F66C5B4

View file

@ -419,6 +419,7 @@ where
scope.spawn(move || {
let runtime = tokio::runtime::Builder::new_multi_thread()
.thread_stack_size(self.stack_size)
.thread_name("teloxide-dispatcher-worker")
.enable_all()
.build()
.unwrap();