* Thread in lib demo - main window = main thread

This commit is contained in:
Michael Van Canneyt 2024-11-06 00:05:59 +01:00
parent de31826647
commit 10d2c51c02
4 changed files with 7 additions and 6 deletions

View File

@ -44,6 +44,10 @@
<Item0 Name="PasJSIsProjectHTMLFile" Value="1"/> <Item0 Name="PasJSIsProjectHTMLFile" Value="1"/>
</CustomData> </CustomData>
</Unit> </Unit>
<Unit>
<Filename Value="../../../packages/wasi/src/rtl.threadcontroller.pas"/>
<IsPartOfProject Value="True"/>
</Unit>
</Units> </Units>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>

View File

@ -4,7 +4,7 @@ program demowasithreads;
uses uses
browserconsole, browserapp, JS, Classes, SysUtils, Web, WebAssembly, types, browserconsole, browserapp, JS, Classes, SysUtils, Web, WebAssembly, types,
wasienv, Rtl.WebThreads, wasihostapp, wasithreadedapp ; wasienv, Rtl.WebThreads, wasihostapp, wasithreadedapp, rtl.threadcontroller ;
Type Type

View File

@ -40,7 +40,7 @@
<div> <div>
<p>Created using &nbsp; <a target="_blank" href="https://wiki.freepascal.org/pas2js">pas2js.</a> </p> <p>Created using &nbsp; <a target="_blank" href="https://wiki.freepascal.org/pas2js">pas2js.</a> </p>
<p>Pas2JS Sources: &nbsp; <a target="new" href="demothreads.lpr">Pas2JS Program</a></p> <p>Pas2JS Sources: &nbsp; <a target="new" href="demothreads.lpr">Pas2JS Program</a></p>
<p>Webassembly Sources: &nbsp; <a target="new" href="threadedapp.pp">FPC Program</a></p> <p>Webassembly Sources: &nbsp; <a target="new" href="threadapp.lpr">FPC Program</a></p>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,4 +1,4 @@
library threadlib; library threadapp;
{$mode objfpc} {$mode objfpc}
{$h+} {$h+}
{$i-} {$i-}
@ -45,9 +45,6 @@ begin
With TCalcThread.Create(False) do With TCalcThread.Create(False) do
begin begin
DebugWriteln('Thread created'); DebugWriteln('Thread created');
// While true do
// DebugWriteln('Waiting for thread');
// DebugWriteln('thread ended');
end; end;
end; end;