mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-04-05 17:07:45 +02:00
* Started message
This commit is contained in:
parent
15d5b68de7
commit
254187c03c
@ -43,6 +43,7 @@ Const
|
|||||||
cmdLoaded = 'loaded';
|
cmdLoaded = 'loaded';
|
||||||
cmdKill = 'kill';
|
cmdKill = 'kill';
|
||||||
cmdSpawn = 'spawn';
|
cmdSpawn = 'spawn';
|
||||||
|
cmdStarted = 'started';
|
||||||
cmdLoad = 'load';
|
cmdLoad = 'load';
|
||||||
cmdRun = 'run';
|
cmdRun = 'run';
|
||||||
cmdExecute = 'execute';
|
cmdExecute = 'execute';
|
||||||
@ -195,6 +196,7 @@ Type
|
|||||||
Module : TJSWebAssemblyModule;
|
Module : TJSWebAssemblyModule;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
{ TWorkerLoadCommandHelper }
|
{ TWorkerLoadCommandHelper }
|
||||||
|
|
||||||
TWorkerLoadCommandHelper = class helper for TWorkerLoadCommand
|
TWorkerLoadCommandHelper = class helper for TWorkerLoadCommand
|
||||||
@ -202,6 +204,17 @@ Type
|
|||||||
Class function Create(aModule : TJSWebAssemblyModule; aMemory : TJSWebAssemblyMemory): TWorkerLoadCommand; static;reintroduce;
|
Class function Create(aModule : TJSWebAssemblyModule; aMemory : TJSWebAssemblyMemory): TWorkerLoadCommand; static;reintroduce;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
TWorkerStartedCommand = class external name 'Object' (TWorkerCommand)
|
||||||
|
StartFunction : string;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ TWorkerStartedCommandHelper }
|
||||||
|
|
||||||
|
TWorkerStartedCommandHelper = class helper for TWorkerStartedCommand
|
||||||
|
Class function CommandName : string; static;
|
||||||
|
Class function Create(aFunction : string): TWorkerStartedCommand; static;reintroduce;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
// Sent by main to worker: run thread procedure
|
// Sent by main to worker: run thread procedure
|
||||||
TWorkerRunCommand = class external name 'Object' (TWorkerCommand)
|
TWorkerRunCommand = class external name 'Object' (TWorkerCommand)
|
||||||
@ -386,6 +399,19 @@ begin
|
|||||||
Result.Module:=aModule;
|
Result.Module:=aModule;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ TWorkerStartedCommandHelper }
|
||||||
|
|
||||||
|
class function TWorkerStartedCommandHelper.CommandName: string;
|
||||||
|
begin
|
||||||
|
result:=cmdStarted;
|
||||||
|
end;
|
||||||
|
|
||||||
|
class function TWorkerStartedCommandHelper.Create(aFunction: string): TWorkerStartedCommand;
|
||||||
|
begin
|
||||||
|
Result:=TWorkerStartedCommand(TWorkerCommand.NewWorker(CommandName));
|
||||||
|
Result.StartFunction:=aFunction;
|
||||||
|
end;
|
||||||
|
|
||||||
{ TWorkerSpawnThreadCommandHelper }
|
{ TWorkerSpawnThreadCommandHelper }
|
||||||
|
|
||||||
class function TWorkerSpawnThreadCommandHelper.CommandName: string;
|
class function TWorkerSpawnThreadCommandHelper.CommandName: string;
|
||||||
|
Loading…
Reference in New Issue
Block a user