H. William Welliver III wrote:
On systems that don???t support naming threads, a parameter would be added either to the pike thread object itself or to the underlying OS thread???s thread specific data. In this situation, the thread name would be available through pike, but not in gdb, etc (but it wouldn???t have been anyway, so no big loss there).
Your thread naming solution sounds good.
It is my understanding (even though I have never delved deep into the threading implementation of Pike myself), that most Pike code runs in the equivalent of a single OS thread. Yes, there is some parallelism, but in a very limited way during execution of "native" C-code.
So, it makes me wonder in what way there even is a one-to-one mapping of threads inside Pike and threads at the OS level?