TThread.NameThreadForDebugging

Set a thread name

Declaration

Source position: classesh.inc line 1951

public 
  class procedure NameThreadForDebugging(aThreadName: UnicodeString; 
                                        aThreadID: TThreadID);  Static;
  class procedure NameThreadForDebugging(aThreadName: AnsiString; 
                                        aThreadID: TThreadID);  Static;

Description

NameThreadForDebugging sets the name of thread aThreadID to aThreadName. The thread name can be Unicode or ansistring. This is mainly useful for debugging purposes, as thread names are more easily recognizable than IDs.

Note that this requires OS support. Currently this is not implemented for any FPC platform and is supported for Delphi compatibility only.