Registriert seit: 20. Jan 2006
Ort: Lübbecke
11.453 Beiträge
Delphi 12 Athens
|
AW: Parallel Programming Library: Übergabe Pointer Problem
30. Okt 2020, 10:21
Delphi-Quellcode:
function MakeTaskWorker(ipMyRecord: pMyRecord): TProc;
begin
Result := procedure
begin
TaskWorker(ipMyRecord);
end)
end;
...
for i:= 0 to RecordArraySize - 1 do begin
fTasks[fTaskNo]:= TTask.Create(MakeTaskWorker(fCurrentRecordArray));
fTasks[fTaskNo].Start;
fCurrentRecordArray:= fCurrentRecordArray^.Next;
Inc(fTaskNo);
end;
|