Delphi 10.3
Omnithead 3.07.5
Hi all,
I'm testing and playing with the sample 24_ConnectionPool, so in the main form I've added
procedure TfrmConnectionPoolDemo.btnScheduleClick(Sender: TObject);
var
i : integer;
Params : TParameters;
begin
WithParamsReset(Params);
WithParam(Params,cDteFrom,'2019/01/01',dtString); WithParam(Params,cDteTo ,'2019/09/01',dtString);
for i:=0 to 99 do // for testing purpose launch 100 task
begin
Log(Format('Creating task %d',));
CreateTask(Worker,format('%0.2d',))
.MonitorWith(OTLMonitor)
.SetParameter('Params',TOmniValue.FromArray<rParameter>(Params))
.SetParameter('ProcName','prc_ProcedureToCall')
.Schedule(FConnectionPool); end;
end;
now my question is ;
how can I retreive the result of the data connection in an object and send it from task Worker to the main thread ?
I was thinking about msg.msgData from IOmniMessage and retreive it through OTLMonitor or insert a TOmniTaskInvokeFunction into my Worker task
What is the best way ?
Thanks
Patrick