For ManagedThreadID, MSDN says:
Gets a unique identifier for the current managed thread.
In what context does "unique" apply?
Is this unique per process?
Per application domain?
Per machine?
Per .NET runtime? (if I have both MS.NET and Mono running)
A thread's ManagedThreadId property value serves to uniquely identify that thread within its process.
The getid() method The getid() function from the Thread class is used to extract a unique thread ID. This unique identifier is assigned when we create a new thread in our program.
A Thread class is responsible for creating and managing a thread in multi-thread programming. It provides a property known as ManagedThreadId to check the unique identifier for the current managed thread.
Thread Provides reference documentation for the Thread class, which represents a managed thread, whether it came from unmanaged code or was created in a managed application. BackgroundWorker Provides a safe way to implement multithreading in conjunction with user-interface objects.
Thread ID is unique per process during a thread's lifecycle. After the thread terminates, its number can be reused.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With