浏览代码

* WebAssembly threads: fix TThread.WaitFor (use -1 instead of 0 to signal infinite timeout)

Nikolay Nikolov 1 年之前
父节点
当前提交
74a4550ff0
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      rtl/wasi/tthread.inc

+ 1 - 1
rtl/wasi/tthread.inc

@@ -216,7 +216,7 @@ end;
 function TThread.WaitFor: Integer;
 function TThread.WaitFor: Integer;
 
 
 begin
 begin
-  WaitFor:=WaitForThreadTerminate(FThreadID,0);
+  WaitFor:=WaitForThreadTerminate(FThreadID,-1);
 end;
 end;
 
 
 {$else FPC_WASM_THREADS}
 {$else FPC_WASM_THREADS}