Show: Delphi C++
Display Preferences

System.Classes.TThread.NameThreadForDebugging

From XE2 API Documentation
Jump to: navigation, search

Delphi

class procedure NameThreadForDebugging(AThreadName: AnsiString; AThreadID: TThreadID = TThreadID(-1)); static;

C++

static void __fastcall NameThreadForDebugging(System::AnsiString AThreadName, unsigned AThreadID = (unsigned)(0xffffffff));

Contents

Properties

Type Visibility Source Unit Parent
procedure
function
public
System.Classes.pas
System.Classes.hpp
System.Classes TThread

Description

Use NameThreadForDebugging to name a thread that was created without a name. Also, use this method to rename a specified thread.

ThreadName is the AnsiString specifying the new name.

ThreadID is the ThreadID property of the TThread instance to be named. If ThreadID is -1, the current thread is renamed.

A thread name is only used to specify thread information in the debugger Thread Status tab. For this reason, NameThreadForDebugging does nothing if the project is running without debugging. The TThread name is not stored in the TThread class instance. The name is kept by the debugger.

See Also


Code Examples

Personal tools
Previous Versions
Translations