Skip to content

SetThreadDebugName

Set the debug name for a thread.

Declaration

Source position: threadh.inc line 173

procedure SetThreadDebugName(threadHandle: TThreadID; 
                            const ThreadName: AnsiString);
procedure SetThreadDebugName(threadHandle: TThreadID; 
                            const ThreadName: UnicodeString);

Description

SetThreadDebugName can be used to set the name of a thread in a debugging context. A debugger can use this information to show the name instead of the thread ID, thus making debugging easier. The current platform's TThreadManager implementation must support this call.

Errors

This call does nothing on platforms that do not support threading.

See also

Name Description
GetCurrentThreadID Return the id of the currently running thread.
TThreadManager Thread manager record.