Is there a way to get the thread id of a thread without passing around
the thread object? I would like to do this because I would like to
pass the thread id of a thread I created as a parameter in a rails
application.
thanks
Is there a way to get the thread id of a thread without passing around
the thread object? I would like to do this because I would like to
pass the thread id of a thread I created as a parameter in a rails
application.
thanks
You can get the current Thread object via Thread.current. You can then
use the object's id as the "thread id". E.g.:
my_thread_id = Thread.current.object_id
Jacob Fugal
On 7/10/06, Erich Lin <dmatrix00d@gmail.com> wrote:
Is there a way to get the thread id of a thread without passing around
the thread object? I would like to do this because I would like to
pass the thread id of a thread I created as a parameter in a rails
application.