mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-08-24 03:29:07 +02:00
* Thread in lib demo - main window = main thread
This commit is contained in:
parent
de31826647
commit
10d2c51c02
@ -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>
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<p>Created using <a target="_blank" href="https://wiki.freepascal.org/pas2js">pas2js.</a> </p>
|
<p>Created using <a target="_blank" href="https://wiki.freepascal.org/pas2js">pas2js.</a> </p>
|
||||||
<p>Pas2JS Sources: <a target="new" href="demothreads.lpr">Pas2JS Program</a></p>
|
<p>Pas2JS Sources: <a target="new" href="demothreads.lpr">Pas2JS Program</a></p>
|
||||||
<p>Webassembly Sources: <a target="new" href="threadedapp.pp">FPC Program</a></p>
|
<p>Webassembly Sources: <a target="new" href="threadapp.lpr">FPC Program</a></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user