PC Review


Reply
Thread Tools Rate Thread

alternative to obsolete GetCurrentThreadId ?

 
 
Mochuelo
Guest
Posts: n/a
 
      14th Mar 2005
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.

 
Reply With Quote
 
 
 
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      14th Mar 2005
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.


--
- Nicholas Paldino [.NET/C# MVP]
- (E-Mail Removed)

"Mochuelo" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.
>



 
Reply With Quote
 
Willy Denoyette [MVP]
Guest
Posts: n/a
 
      14th Mar 2005

"Mochuelo" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Google Adsense Alternative - Commission Junction Alternative -ClickBank Alternative William9999 Windows XP Performance 0 2nd Nov 2010 09:02 AM
Google Adsense Alternative - Commission Junction Alternative -ClickBank Alternative William9999 Windows XP Performance 0 2nd Nov 2010 09:01 AM
Pragma to suppress deprecated GetCurrentThreadId KenDev Microsoft C# .NET 3 23rd Sep 2008 05:10 PM
AppDomain.GetCurrentThreadId() and ManagedThreadId are different peter.moss@gmail.com Microsoft C# .NET 1 30th Dec 2005 04:06 PM
GetCurrentThreadId Tibor Meinczinger Microsoft Dot NET Compact Framework 2 29th Jul 2003 08:29 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:26 AM.