瀏覽代碼

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

Nikolay Nikolov 1 年之前
父節點
當前提交
02867fe918
共有 1 個文件被更改,包括 1 次插入0 次删除
  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}