Is your feature request related to a problem? Please describe.
- Having the ability to easily name threads would improve/simplify looking at the resource usage while monitoring/debugging in htop (with "Show custom thread names") enabled.
- Commonly used process exporter https://github.com/ncabatoff/process-exporter could expose thread names for prometheus and other monitoring tools in human readable format
Describe the solution you'd like
- accept name or customName in the options object in
new Worker constructor
- add .setName() or .setCustomName() to the worker class
- the above format should be fully backwards compatible
Describe alternatives you've considered
Haven't considered any alternatives at the moment.
I am not sure if process.execArgv can be leveraged here to set a thread name as an alternative way of setting it.
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
new WorkerconstructorDescribe alternatives you've considered
Haven't considered any alternatives at the moment.
I am not sure if process.execArgv can be leveraged here to set a thread name as an alternative way of setting it.