473,396 Members | 2,098 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

alternative to obsolete GetCurrentThreadId ?

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.

Nov 16 '05 #1
2 3615
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]
- mv*@spam.guard.caspershouse.com

"Mochuelo" <ho**@que.tal> wrote in message
news:gq********************************@4ax.com...
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.

Nov 16 '05 #2

"Mochuelo" <ho**@que.tal> wrote in message
news:gq********************************@4ax.com...
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.
Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: MTriggs886 | last post by:
There isn't a command that exists that can serve as an alternative to EMBED in HTML 4.01 Transitional coding, is there? I've historically used this command to play MIDI files in the background of...
0
by: jbeerni | last post by:
In .NET, you can mark methods and accessors as obsolete by using the directive. I've found some interesting behavior with the directive when used in a class which is referenced as a return type...
4
by: BrianProgrammer | last post by:
I have this code below, that works like a champ, but two lines are continually marked as obsolete. See embeded notes. Private Shared Function TransformHTMLString(ByVal XSLT As String, _ ByVal...
2
by: Steve James | last post by:
I am trying to mark an override method in a derived class as obsolete using the ObsoleteAttribute. The compiler, however is not picking up this attribute and is not generating a warning or an...
1
by: BrianProgrammer | last post by:
I have this code below, that works like a champ, but two lines are continually marked as obsolete. See embeded notes. Private Shared Function TransformHTMLString(ByVal XSLT As String, _ ByVal...
4
by: Phill W. | last post by:
If I have a reusbale (GAC-'registered') assembly that contains two, related classes (imagine a DataSet and DataTable; the former contains instances of the latter, the latter has a reference to its...
9
by: Erwin Moller | last post by:
Hi, Can anybody comment on this? In comp.lang.php I advised somebody to skip using: <script language="javascript"> and use: <script type="text/javascript"> And mr. Dunlop gave this response:
11
by: Francine.Neary | last post by:
I've read that as well as "normal" Java-like function definitions, e.g. int main(int argc, char **argv), you can also choose to use an alternative syntax, i.e. int main(argc, argv) int argc;...
3
by: =?Utf-8?B?S2VuRGV2?= | last post by:
I would like to know if there is a pragma id that I can use to suppress the warning I get (.NET 2.0) for the GetCurrentThreadId. I want to use warnings as errors and I don't want to change the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.