Naming a Thread

From RAD Studio
Jump to: navigation, search

Go Up to Debugging Multi-threaded Applications

Because it is difficult to tell which thread ID refers to which thread in the Thread Status box, you might want to name your thread classes.

For threads that are not created using a TThread object, you can also use the NameThreadForDebugging method, which allows you to name a thread given its ID (specified as AThreadId). The provided name is then displayed in the RAD Studio debugger to ease the debugging process. Note that NameThreadForDebugging is a method that must be called at run time by the application itself for all the non-TThread threads that are being created.

You can also temporarily name a thread during a debugging session; see Naming a Thread While Debugging.

Topics

See Also