mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-05 09:58:21 +02:00
multithreadprocs: English
git-svn-id: trunk@49933 -
This commit is contained in:
parent
9f58c5b0c2
commit
83c3757b85
@ -54,7 +54,7 @@ begin
|
||||
Results[Index]:=-1;
|
||||
i:=Index;
|
||||
while i<List.Count-1 do begin
|
||||
if List[i]=Value then // hier wuerde die teure Vergleichsoperation stehen
|
||||
if List[i]=Value then // imagine here an expensive compare function
|
||||
Results[Index]:=i;
|
||||
inc(i,BlockCount);
|
||||
end;
|
||||
@ -72,7 +72,7 @@ begin
|
||||
BlockCount:=ProcThreadPool.MaxThreadCount;
|
||||
SetLength(Results,BlockCount);
|
||||
ProcThreadPool.DoParallel(@FindBestParallel,0,BlockCount-1,@Data);
|
||||
// Ergebnisse zusammenfassen
|
||||
// collect results
|
||||
Result:=-1;
|
||||
for Index:=0 to BlockCount-1 do
|
||||
if Results[Index]>=0 then
|
||||
@ -87,7 +87,7 @@ begin
|
||||
Result:=-1;
|
||||
i:=0;
|
||||
while i<List.Count do begin
|
||||
if List[i]=Value then // hier wuerde die teure Vergleichsoperation stehen
|
||||
if List[i]=Value then // imagine here an expensive compare function
|
||||
Result:=i;
|
||||
inc(i);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user