Explorar o código

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

Nikolay Nikolov hai 1 ano
pai
achega
02867fe918
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      rtl/wasi/systhrd.inc

+ 1 - 0
rtl/wasi/systhrd.inc

@@ -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}