Thread name from thread id?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Hector Urroz

    Thread name from thread id?

    Anyone have any hints on how to obtain a thread's name from the thread id?
    I'm using a handler in the Logger class, which provides a method to get the
    id of the thread that invoked the logger, but no method for the name.

    Thanks much,

    Hector


  • Anthony Borla

    #2
    Re: Thread name from thread id?


    "Hector Urroz" <h.urroz@comcas t.net> wrote in message
    news:H4idnfXmQo sSgFOiRVn-vw@comcast.com. ..[color=blue]
    >
    > Anyone have any hints on how to obtain a thread's name from
    > the thread id? I'm using a handler in the Logger class, which
    > provides a method to get the id of the thread that invoked the
    > logger, but no method for the name.
    >[/color]

    This is possible, though whether it is practical in your case is for you to
    decide. You may want to read:



    for details.

    I hope this helps.

    Anthony Borla


    Comment

    • Hector Urroz

      #3
      Re: Thread name from thread id?

      Anthony, thanks for the suggestion, but I'm looking for something a little
      more lightweight, callable within my application's jvm. Someone else
      responded with an emailed algorithm that might do the job.

      Hector


      "Anthony Borla" <ajborla@bigpon d.com> wrote in message
      news:u1xzb.3854 6$aT.36166@news-server.bigpond. net.au...[color=blue]
      >
      > "Hector Urroz" <h.urroz@comcas t.net> wrote in message
      > news:H4idnfXmQo sSgFOiRVn-vw@comcast.com. ..[color=green]
      > >
      > > Anyone have any hints on how to obtain a thread's name from
      > > the thread id? I'm using a handler in the Logger class, which
      > > provides a method to get the id of the thread that invoked the
      > > logger, but no method for the name.
      > >[/color]
      >
      > This is possible, though whether it is practical in your case is for you[/color]
      to[color=blue]
      > decide. You may want to read:
      >
      > http://java.sun.com/products/jpda/
      >
      > for details.
      >
      > I hope this helps.
      >
      > Anthony Borla
      >
      >[/color]


      Comment

      Working...