summaryrefslogtreecommitdiff
path: root/avx512-0037785/rtl/win/systhrd.inc
diff options
context:
space:
mode:
Diffstat (limited to 'avx512-0037785/rtl/win/systhrd.inc')
-rw-r--r--avx512-0037785/rtl/win/systhrd.inc7
1 files changed, 6 insertions, 1 deletions
diff --git a/avx512-0037785/rtl/win/systhrd.inc b/avx512-0037785/rtl/win/systhrd.inc
index 10bb07fda4..1d366ece51 100644
--- a/avx512-0037785/rtl/win/systhrd.inc
+++ b/avx512-0037785/rtl/win/systhrd.inc
@@ -256,7 +256,12 @@ var
{$endif DEBUG_MT}
{ Initialize multithreading if not done }
SysInitTLS;
- IsMultiThread:=true;
+ if not IsMultiThread then
+ begin
+ { lazy initialize thread support }
+ LazyInitThreading;
+ IsMultiThread:=true;
+ end;
{ the only way to pass data to the newly created thread
in a MT safe way, is to use the heap }