+ WebAssembly threads: initialize the ThreadId threadvar for the main thread

This commit is contained in:
Nikolay Nikolov 2024-08-18 11:41:04 +03:00
parent 13fbc876e0
commit 02867fe918

View File

@ -132,6 +132,7 @@ begin
GlobalIsMainThread:=1;
GlobalIsWorkerThread:=0;
GlobalCurrentThread:=@MainThread;
ThreadId:=@MainThread;
{$IFDEF FPC_WASM_MAIN_THREAD_CAN_WAIT}
GlobalIsThreadBlockable:=1;
{$ELSE FPC_WASM_MAIN_THREAD_CAN_WAIT}