Skip to content

give threads a name prefix #1332

@bmxp

Description

@bmxp

Just an idea if python-telegram-bot is part of a bigger program:

It would be a nice thing to improve bug finding in bigger programms of which python-telegram-bot is a part of if one could name the thread. Instead of names like

dispatcher
updater
84a23bc3-ec23-4aeb-be53-f24e7af82544_0
84a23bc3-ec23-4aeb-be53-f24e7af82544_1
84a23bc3-ec23-4aeb-be53-f24e7af82544_2
84a23bc3-ec23-4aeb-be53-f24e7af82544_3

I would rather like to see

telegram_dispatcher
telegram_updater
telegram_worker_0
telegram_worker_1
telegram_worker_2
telegram_worker_3

Since any thread has an id anyway, this should not be too difficult.
So instead using uuid4 to name a worker, just give a custom param of name_prefix='telegram' and worker_name='worker'

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions