[fpc-devel] r45217 breaks Lazarus compile
Marc Weustink
marc at dommelstein.nl
Tue May 5 11:21:36 CEST 2020
On 5-5-2020 11:08, Sven Barth via fpc-devel wrote:
> Marc Weustink via fpc-devel <fpc-devel at lists.freepascal.org
> <mailto:fpc-devel at lists.freepascal.org>> schrieb am Di., 5. Mai 2020, 09:27:
>
> Sven Barth via fpc-devel wrote:
> >
> > TThread.NameThreadForDebugging is implemented for Windows, Linux and
> > Android since the weekend.
>
> Just curious, why is NameThreadForDebugging used instead of simply
> TThread.Name ?
>
> ForDebugging is just one of the purposes, and TThread.NameThread is
> double, since it is a property of a thread, what else would you give
> a name.
>
>
> As Marco said, Delphi compatibility.
Sigh.... reading the Delphi docs now and I understand the name
> Also debugging *is* the *only*
> purpose of this. Not to mention that this is a write only functionality.
> There is no way to retrieve the thread's name and it's also not stored
> anywhere on the Pascal side.
Not entirely true on windows. There are 2 ways to name a thread. The
first is indeed for debugging only since it is passed to the debugger
though some predefined exception.
The second is recently introduced by the Get/SetThreadDescription
functions. The Get function can be used by other (non debugger)
applications. Some applications already set the description this way.
Marc
More information about the fpc-devel
mailing list