<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body>
<div class="moz-cite-prefix">Am 28.03.2021 um 21:46 schrieb
Alexander Grotewohl via fpc-devel:<br>
</div>
<blockquote type="cite"
cite="mid:MN2PR03MB5296FFF54388F91E8273EEA6C57F9@MN2PR03MB5296.namprd03.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<div style="color: rgb(33, 33, 33); background-color: rgb(255,
255, 255);" dir="auto">
looks like threadid is assigned to getcurrentthreadid in an
initthread() function in thread.inc.</div>
<div style="color: rgb(33, 33, 33); background-color: rgb(255,
255, 255);" dir="auto">
<br>
</div>
<div style="color: rgb(33, 33, 33); background-color: rgb(255,
255, 255);" dir="auto">
but: getcurrentthreadid looks to be mapped to a changeable
thread manager which is why that might seem weird in the docs..</div>
</blockquote>
<br>
Correct. GetCurrentThreadID always calls through the thread manager
to retrieve the current thread's ID while ThreadID is initialized in
the thread's initialization. This make a difference if you're
dealing with external threads (those not started through the RTL,
but from e.g. C code). Though depending on the threading
implementation it /might/ be that it sets up ThreadID nevertheless.
In essence: Best use GetCurrentThreadID.<br>
<br>
Regards,<br>
Sven<br>
</body>
</html>