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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top