I don’t know if this is a question or a feature request. In the course
of debuggind a Ruby application using threads I realize that it would be
great if we could give a name to a thread, i mean a human readable piece
of text that one could see when listing threads for instance.
Does this already exist? if not what about adding a new Thread#name=
and Thread#name instance methods in 1.7.x ?
Does this already exist? if not what about adding a new Thread#name=
and Thread#name instance methods in 1.7.x ?
Just use a thread local variable
Guy Decoux
This is an option of course. But in my case I’m writing a graphical
debugger and I want to display the threads of the debugged application
with their names. By definition I have no control over the name of the
local variable used by the author of the program to assign a label to
the thread. Hence the idea of having an “official” way of naimng threads.
This is an option of course. But in my case I'm writing a graphical
debugger and I want to display the threads of the debugged application
with their names. By definition I have no control over the name of the
local variable used by the author of the program to assign a label to
the thread. Hence the idea of having an "official" way of naimng threads.