alternative to obsolete GetCurrentThreadId ?

  • Thread starter Thread starter Mochuelo
  • Start date Start date
M

Mochuelo

Hi,

Is there a non-obsolete alternative to the obsolete
GetCurrentThreadID?

I just need an ID (ideally, an int) that will distinguish any two
threads.

Thanks.
 
Mochuelo,

You will want to use the ManagedThreadId on the Thread instance. This
will give you unique values for separate threads, whether or not those
threads are implemented using fibers, or actual different threads.

Hope this helps.
 
Mochuelo said:
Hi,

Is there a non-obsolete alternative to the obsolete
GetCurrentThreadID?

I just need an ID (ideally, an int) that will distinguish any two
threads.

Thanks.

ManagedThreadId

Willy.
 
Back
Top