Jaan
10/6/2003 11:46:00 PM
Nevermind, I found it.
System.Threading.Thread.CurrentThread.Name
In the parent thread, you just name your threads and in
the child threads, you look at the property:
System.Threading.Thread.CurrentThread.Name
>-----Original Message-----
>Coming from the world of unix, I'm looking for a C#
>fucntion that does as the unix thr_self() function does.
>
>For those of you who arent familiar with that function,
I
>basically need a method of letting a child thread obtain
>a unique thread id.
>
>I simply want to print a message to the console and i'd
>like the message to contain a unique id for each thread
>so I can tell which thread is doing what.
>
>Any way to do this?
>I've seen the thread name property, but how does the
>child thread know which one is his. assuming there are
>more than 2-3 threads?
>
>Help please. (remember, simple is the operative word
>here.)
>Thanks for your time.
>
>.
>