Closed ClayJay3 closed 1 day ago
Hi @ClayJay3 and thanks for the feature request! I am actually adding some OS-specific features like thread priority and affinity to the upcoming v5.0.0 release, so I will look into adding this too. I don't think it's too useful for use from within tasks in the thread pool itself, since you don't know which thread is going to execute your task anyway, but perhaps you could give the whole thread pool a name like "My Pool" and it will automatically change the thread names to "My Pool 1", "My Pool 2", and so on, and a generic function could be made available so users can use it in non-pool threads. Let me know what you think!
That's cool with me! I agree, I personally have no need be able to name the individual threads in a thread pool, but being able to assign a name to the entire pool or independently running threads would be nice.
Describe the new feature
I was wondering if it's currently possible or would be possible to name threads so that they would show up more easily identifiable in things like the VSCode debugger.
Code example
On linux using pthreads it can be set like this:
On windows it can be set like this.
Additional information
An example from inside the VSCode debugger callstack: