Nova verze je online. Obsahuje precompilator trid pro spusteni v ramci MultiTask. Generuje OnNewWork, generuje metody pro volani bez Enqueue.
Priklad :
tIQDeploy_v4 = class(TObject) {class_MT}
published
{$I MT_onNewWork.inc}
procedure Load_Image(const id: integer; const item: iSuperObject; const fn: string); {gen_MT}
{$I MT_def.inc}
end;
implementation
{$I MT_impl.inc}
V tomto pripade vygeneruje precompilator metody :
procedure Load_Image_MT( const id : integer; const item : iSuperObject; const fn : string);
procedure Load_Image_MT_Last( const id : integer; const item : iSuperObject; const fn : string);
procedure Load_Image_MT_Low( const id : integer; const item : iSuperObject; const fn : string);
procedure Load_Image_MT_Normal( const id : integer; const item : iSuperObject; const fn : string);
procedure Load_Image_MT_High( const id : integer; const item : iSuperObject; const fn : string);
procedure Load_Image_MT_ASAP( const id : integer; const item : iSuperObject; const fn : string);
procedure Load_Image_MT_Unique( const id : integer; const item : iSuperObject; const fn : string);
procedure Load_Image_MT_Unique_Last( const id : integer; const item : iSuperObject; const fn : string);
procedure Load_Image_MT_Unique_Low( const id : integer; const item : iSuperObject; const fn : string);
procedure Load_Image_MT_Unique_Normal( const id : integer; const item : iSuperObject; const fn : string);
procedure Load_Image_MT_Unique_High( const id : integer; const item : iSuperObject; const fn : string);
procedure Load_Image_MT_Unique_ASAP( const id : integer; const item : iSuperObject; const fn : string);
v te same tride. Prostym zavolanim _MT misto prime metody zaridite, ze se dana metoda spusti ve zvlastnim vlakne MultiTasku.
Metody _MT_XXX slouzi pro prime vlozeni do fronty dle pozadovane priority, tudiz je mozno velmi pekne ridit, co se kdy ma spustit apod

Metody _MT_Unique* slouzi pro vlozeni do fronty POUZE pokud stejna metoda SE STEJNYMI parametry jiz neni ve fronte, nebo aktualne provadena.
Precompilator je maximalne customizovatelny, v realu vygeneruje 3 soubory -
OnNewWork.inc (tuto metodu stale dokola spousti kazde vlakno MultiTasku, a ona rozhoduje co se vlastne ma spustit a zajisti spusteni),
MT_def.inc - definice pridavnych metod
MT_impl.inc - implementace prikazu pro vlozeni do fronty tasku.
Parametry (ci konfiguracnim souborem) je mozno urcite vicemene cokoliv od jmena tridy (pokud neni oznacen flagem viz vyse), pres suffix metod az po typ metod k vygenerovani.
Priklad spusteni v prebuild eventu lazarusu - ci jinde dle libosti :
MultiTask_PreCompiler.exe --configuration-file MultiTask_PreCompiler.cfg deploy_v4.pas
Konfiguracni soubor obsahuje napirklad nasledujici :
-mdf MT_definition.inc -mif MT_implementation.inc -onwf MT_onNewWork.inc -onw On_New_Work -lapm -lopm -npm -hpm -apm
Vypis helpu :
MultiTask_PreCompiler - v0.1 - build on 2017/03/29 20:57:38
--configuration-file parameter <string>
description : file with configuration
-mfn or --Method-Flag-Name parameter <string>
default : MT
description : compile methods tag with {gen_<Method-Flag-Name>}
-cn or --Class-Name parameter <string>
description : to which class generated methods belongs, or class can be selected as class_<Method-Flag-Name> flag
-mto or --Multi-Task-Object parameter <string>
default : MultiTask
description : name of MultiTask object variable
-mdf or --Method-Definition-File parameter <string>
description : when use .inc file for generated interface, this is filename for it, default <InputFileName>+_<Method-Flag
-mif or --Method-Implementation-File parameter <string>
description : when use .inc file for implementation, this is filename for it, default <InputFileName>+_<Method-Flag-Name
-onwf or --On-New-Work-Method-FileName parameter <string>
description : Name of main worker method file - default <InputFileName>+_onNewWork.inc
-onw or --On-New-Work-Method-Name parameter <string>
default : On_New_Work
description : Name of main worker method - this method is generated and runs adequate method
-dms or --Default-Method-Suffix parameter <string>
default : _MT
description : default suffix for generated multi task methods f.e.: Write->Write_<Default-Method-Suffix>
-dgmm or --Disable-Main-Methods parameter <bool>
default : YES
description : generate main multitask invoke methods
-gum or --Unique-Methods parameter <bool>
default : no
description : generate unique multitask invoke methods
-dp or --Default-Priority parameter <string>
default : NORMAL
description : default priority for enqueuing
-lapm or --Last-Priority-Methods parameter <bool>
default : no
description : generation of f.e.: Write->Write_<Default-Method-Suffix>_Last_Priority
-lopm or --Low-Priority-Methods parameter <bool>
default : no
description : generation of f.e.: Write->Write_<Default-Method-Suffix>_Low_Priority
-npm or --Normal-Priority-Methods parameter <bool>
default : no
description : generation of f.e.: Write->Write_<Default-Method-Suffix>_Normal_Priority
-hpm or --High-Priority-Methods parameter <bool>
default : no
description : generation of f.e.: Write->Write_<Default-Method-Suffix>_HIGH_Priority
-apm or --ASAP-Priority-Methods parameter <bool>
default : no
description : generation of f.e.: Write->Write_<Default-Method-Suffix>_ASAP_Priority
<filename>
description : input file for compilation
-h or --help parameter <bool>
default : no
description : print help string - this list