mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-25 12:09:16 +02:00
mtprocs: fixed CalcBlockSize when MinBlockSize<1, bug #30612
git-svn-id: trunk@52986 -
This commit is contained in:
parent
e0b8bceb8e
commit
c69f972142
@ -708,6 +708,7 @@ begin
|
||||
BlockCount:=ProcThreadPool.MaxThreadCount;
|
||||
BlockSize:=(LoopLength div BlockCount);
|
||||
if (BlockSize<MinBlockSize) then BlockSize:=MinBlockSize;
|
||||
if BlockSize<1 then BlockSize:=1;
|
||||
BlockCount:=((LoopLength-1) div BlockSize)+1;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user