diff --git a/OtlParallel.pas b/OtlParallel.pas index 9160097b..c7ca90a2 100644 --- a/OtlParallel.pas +++ b/OtlParallel.pas @@ -507,6 +507,7 @@ interface IOmniParallelSimpleLoop = interface function CancelWith(const token: IOmniCancellationToken): IOmniParallelSimpleLoop; function NoWait: IOmniParallelSimpleLoop; + function NoMsgBlock: IOmniParallelSimpleLoop; function NumTasks(taskCount : integer): IOmniParallelSimpleLoop; function OnStop(stopCode: TProc): IOmniParallelSimpleLoop; overload; function OnStop(stopCode: TOmniTaskStopDelegate): IOmniParallelSimpleLoop; overload; @@ -530,6 +531,7 @@ interface IOmniParallelSimpleLoop = interface function CancelWith(const token: IOmniCancellationToken): IOmniParallelSimpleLoop; function NoWait: IOmniParallelSimpleLoop; + function NoMsgBlock: IOmniParallelSimpleLoop; function NumTasks(taskCount : integer): IOmniParallelSimpleLoop; function OnStop(stopCode: TProc): IOmniParallelSimpleLoop; overload; function OnStop(stopCode: TOmniTaskStopDelegate): IOmniParallelSimpleLoop; overload; @@ -902,6 +904,7 @@ TPartitionInfo = record FFirst : integer; FInitializerDelegate: TOmniSimpleTaskInitializerTaskDelegate; FLast : integer; + FNoMsgBlock : boolean; FNoWait : boolean; FNumTasks : integer; FNumTasksManual : boolean; @@ -918,6 +921,7 @@ TPartitionInfo = record constructor Create(first, last: integer; step: integer = 1); destructor Destroy; override; function CancelWith(const token: IOmniCancellationToken): IOmniParallelSimpleLoop; + function NoMsgBlock: IOmniParallelSimpleLoop; function NoWait: IOmniParallelSimpleLoop; function NumTasks(taskCount : integer): IOmniParallelSimpleLoop; function OnStop(stopCode: TProc): IOmniParallelSimpleLoop; overload; @@ -942,6 +946,7 @@ TOmniParallelSimpleLoop = class(TInterfacedObject, IOmniParallelSimpleLoop< public constructor Create(const arr: TArray); function CancelWith(const token: IOmniCancellationToken): IOmniParallelSimpleLoop; inline; + function NoMsgBlock: IOmniParallelSimpleLoop; inline; function NoWait: IOmniParallelSimpleLoop; inline; function NumTasks(taskCount : integer): IOmniParallelSimpleLoop; inline; function OnStop(stopCode: TProc): IOmniParallelSimpleLoop; overload; inline; @@ -3510,6 +3515,8 @@ procedure TOmniParallelSimpleLoop.InternalExecute(const taskDelegate: TTaskDeleg lockAggregate: IOmniCriticalSection; task : IOmniTaskControl; taskCount : integer; + awaited : DWORD; + handles: array [0 .. 0] of THandle; begin dmOptions := []; taskCount := FNumTasks; @@ -3531,7 +3538,17 @@ procedure TOmniParallelSimpleLoop.InternalExecute(const taskDelegate: TTaskDeleg FCountStopped.Allocate //all done else {$IFDEF MSWINDOWS} - WaitForSingleObject(FCountStopped.Handle, INFINITE); + if FNoMsgBlock then begin + while true do begin + handles[0] := FCountStopped.Handle; + awaited := MsgWaitForMultipleObjects(1, handles, false, INFINITE, QS_ALLINPUT); + case awaited of + WAIT_OBJECT_0: break; + WAIT_OBJECT_0 + 1: DSiProcessThreadMessages; + end; + end; + end else + WaitForSingleObject(FCountStopped.Handle, INFINITE); {$ELSE} FCountStopped.Synchro.WaitFor(INFINITE); {$ENDIF ~MSWINDOWS} @@ -3540,6 +3557,12 @@ procedure TOmniParallelSimpleLoop.InternalExecute(const taskDelegate: TTaskDeleg end; end; { TOmniParallelSimpleLoop.InternalExecute } +function TOmniParallelSimpleLoop.NoMsgBlock: IOmniParallelSimpleLoop; +begin + FNoMsgBlock := true; + Result := Self; +end; { TOmniParallelSimpleLoop.NoMsgBlock } + function TOmniParallelSimpleLoop.NoWait: IOmniParallelSimpleLoop; begin FNoWait := true; @@ -3676,6 +3699,12 @@ function TOmniParallelSimpleLoop.Initialize( Result := Self; end; { TOmniParallelSimpleLoop.Initialize } +function TOmniParallelSimpleLoop.NoMsgBlock: IOmniParallelSimpleLoop; +begin + FIterator.NoMsgBlock; + Result := Self; +end; { TOmniParallelSimpleLoop.NoMsgBlock } + function TOmniParallelSimpleLoop.NoWait: IOmniParallelSimpleLoop; begin FIterator.NoWait; diff --git a/tests/58_ForVsForEach/app_58_ForVsForEach.10_2Tokyo.dproj b/tests/58_ForVsForEach/app_58_ForVsForEach.10_2Tokyo.dproj index e3d8d478..2d95fb97 100644 --- a/tests/58_ForVsForEach/app_58_ForVsForEach.10_2Tokyo.dproj +++ b/tests/58_ForVsForEach/app_58_ForVsForEach.10_2Tokyo.dproj @@ -1,505 +1,612 @@ - - - {1F8C260D-4FA1-4722-A938-BBF0A08E2823} - 16.0 - VCL - app_58_ForVsForEach.dpr - True - Debug - Win32 - 1 - Application - - - true - - - true - Base - true - - - true - Base - true - - - true - Base - true - - - true - Cfg_1 - true - true - - - true - Base - true - - - app_58_ForVsForEach - $(BDS)\bin\delphi_PROJECTICON.ico - System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace) - .\$(Platform)\$(Config) - .\$(Platform)\$(Config) - false - false - false - false - false - - - IndyIPClient;FireDACASADriver;FireDACSqliteDriver;bindcompfmx;FireDACDSDriver;DBXSqliteDriver;FireDACPgDriver;FireDACODBCDriver;RESTBackendComponents;emsclientfiredac;fmx;rtl;dbrtl;DbxClientDriver;IndySystem;FireDACCommon;bindcomp;inetdb;tethering;vclib;DBXInterBaseDriver;DataSnapClient;DataSnapServer;DataSnapCommon;DBXOdbcDriver;vclFireDAC;DataSnapProviderClient;xmlrtl;DataSnapNativeClient;DBXSybaseASEDriver;DbxCommonDriver;vclimg;ibxpress;IndyProtocols;dbxcds;DBXMySQLDriver;DatasnapConnectorsFreePascal;FireDACCommonDriver;MetropolisUILiveTile;bindengine;vclactnband;vcldb;bindcompdbx;soaprtl;vcldsnap;bindcompvcl;vclie;fmxFireDAC;FireDACADSDriver;vcltouch;DBXDb2Driver;emsclient;CustomIPTransport;DBXOracleDriver;vclribbon;VCLRESTComponents;FireDACMSSQLDriver;FireDAC;VclSmp;dsnap;DBXInformixDriver;vcl;DataSnapConnectors;fmxase;DataSnapServerMidas;DBXMSSQLDriver;IndyIPCommon;IndyCore;dsnapcon;FireDACIBDriver;DBXFirebirdDriver;inet;IndyIPServer;DataSnapFireDAC;fmxobj;CloudService;FireDACDBXDriver;FireDACMySQLDriver;soapmidas;vclx;soapserver;inetdbxpress;DBXSybaseASADriver;dsnapxml;FireDACOracleDriver;FireDACInfxDriver;FireDACDb2Driver;RESTComponents;fmxdae;FireDACMSAccDriver;dbexpress;DataSnapIndy10ServerTransport;adortl;$(DCC_UsePackage) - - - true - 1033 - Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) - $(BDS)\bin\default_app.manifest - CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= - IndyIPClient;FireDACASADriver;FireDACSqliteDriver;bindcompfmx;FireDACDSDriver;DBXSqliteDriver;FireDACPgDriver;FireDACODBCDriver;RESTBackendComponents;emsclientfiredac;fmx;rtl;dbrtl;DbxClientDriver;IndySystem;FireDACCommon;bindcomp;inetdb;tethering;vclib;DBXInterBaseDriver;DataSnapClient;DataSnapServer;DataSnapCommon;DBXOdbcDriver;vclFireDAC;DataSnapProviderClient;xmlrtl;DataSnapNativeClient;DBXSybaseASEDriver;DbxCommonDriver;svnui;vclimg;ibxpress;IndyProtocols;dbxcds;DBXMySQLDriver;DatasnapConnectorsFreePascal;FireDACCommonDriver;MetropolisUILiveTile;bindengine;vclactnband;vcldb;bindcompdbx;soaprtl;vcldsnap;bindcompvcl;vclie;OmniThreadLibraryRuntimeXE7;fmxFireDAC;FireDACADSDriver;vcltouch;DBXDb2Driver;emsclient;CustomIPTransport;DBXOracleDriver;vclribbon;VCLRESTComponents;FireDACMSSQLDriver;FireDAC;VclSmp;dsnap;DBXInformixDriver;vcl;DataSnapConnectors;fmxase;DataSnapServerMidas;DBXMSSQLDriver;IndyIPCommon;IndyCore;dsnapcon;FireDACIBDriver;DBXFirebirdDriver;inet;IndyIPServer;DataSnapFireDAC;fmxobj;CloudService;FireDACDBXDriver;FireDACMySQLDriver;soapmidas;vclx;soapserver;inetdbxpress;svn;DBXSybaseASADriver;dsnapxml;FireDACOracleDriver;FireDACInfxDriver;FireDACDb2Driver;RESTComponents;fmxdae;FireDACMSAccDriver;dbexpress;DataSnapIndy10ServerTransport;adortl;$(DCC_UsePackage) - - - DEBUG;$(DCC_Define) - true - false - true - true - true - - - true - ..\..;$(DCC_UnitSearchPath) - 1033 - false - - - false - RELEASE;$(DCC_Define) - 0 - 0 - - - - MainSource - - -
frmForVsForEach
- dfm -
- - Cfg_2 - Base - - - Base - - - Cfg_1 - Base - -
- - Delphi.Personality.12 - Application - - - - app_58_ForVsForEach.dpr - - - False - False - 1 - 0 - 0 - 0 - False - False - False - False - False - 1060 - 1250 - - - - - 1.0.0.0 - - - - - - 1.0.0.0 - - - - TurboPower Async Professional 5.01 Runtime Package - ExpressGDI+ Library by Developer Express Inc. - ExpressBars DBNavigator by Developer Express Inc. - Overbyte ICS Design-Time Package for Delphi XE2 - File C:\Users\Public\Documents\RAD Studio\9.0\Bpl\B305vdXE2.bpl not found - JCL Integration of version control systems in the IDE - Microsoft Office 2000 Sample Automation Server Wrapper Components - Microsoft Office XP Sample Automation Server Wrapper Components - IP Abstraction Indy Implementation Design Time - File C:\Users\Public\Documents\RAD Studio\9.0\Bpl\JclDebugExpert160.bpl not found - File C:\Users\Public\Documents\RAD Studio\9.0\Bpl\JclProjectAnalysisExpert160.bpl not found - File C:\Users\Public\Documents\RAD Studio\9.0\Bpl\JclFavoriteFoldersExpert160.bpl not found - File C:\Users\Public\Documents\RAD Studio\9.0\Bpl\JclRepositoryExpert160.bpl not found - File C:\Users\Public\Documents\RAD Studio\9.0\Bpl\JclSIMDViewExpert160.bpl not found - File C:\Users\Public\Documents\RAD Studio\9.0\Bpl\JclStackTraceViewerExpert160.bpl not found - OmniThreadLibrary designtime - - - - - - app_58_ForVsForEach.exe - - - - - 1 - .dylib - - - 0 - .bpl - - - Contents\MacOS - 1 - .dylib - - - 1 - .dylib - - - - - 1 - .dylib - - - 0 - .dll;.bpl - - - Contents\MacOS - 1 - .dylib - - - 1 - .dylib - - - - - 1 - - - 1 - - - - - Contents - 1 - - - - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF - 1 - - - - - res\drawable-normal - 1 - - - - - library\lib\x86 - 1 - - - - - 1 - - - 1 - - - - - Contents - 1 - - - - - library\lib\armeabi-v7a - 1 - - - - - 1 - - - 1 - - - - - res\drawable-xlarge - 1 - - - - - res\drawable-xhdpi - 1 - - - - - 1 - - - 1 - - - - - res\drawable-xxhdpi - 1 - - - - - library\lib\mips - 1 - - - - - res\drawable - 1 - - - - - Contents\MacOS - 1 - - - 1 - - - 0 - - - - - Contents\MacOS - 1 - .framework - - - 0 - - - - - res\drawable-small - 1 - - - - - 1 - - - - - Contents\MacOS - 1 - - - 1 - - - Contents\MacOS - 0 - - - - - classes - 1 - - - - - 1 - - - 1 - - - - - 1 - - - 1 - - - - - res\drawable - 1 - - - - - Contents\Resources - 1 - - - - - 1 - - - - - 1 - - - 1 - - - - - 1 - - - library\lib\armeabi-v7a - 1 - - - 0 - - - Contents\MacOS - 1 - - - 1 - - - - - library\lib\armeabi - 1 - - - - - res\drawable-large - 1 - - - - - 0 - - - 0 - - - 0 - - - Contents\MacOS - 0 - - - 0 - - - - - 1 - - - 1 - - - - - res\drawable-ldpi - 1 - - - - - res\values - 1 - - - - - 1 - - - 1 - - - - - res\drawable-mdpi - 1 - - - - - res\drawable-hdpi - 1 - - - - - 1 - - - - - - - - - - - False - True - - - 12 - - - - -
+ + + {1F8C260D-4FA1-4722-A938-BBF0A08E2823} + 18.3 + VCL + app_58_ForVsForEach.dpr + True + Debug + Win32 + 3 + Application + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + true + Cfg_2 + true + true + + + app_58_ForVsForEach_10_2Tokyo + $(BDS)\bin\delphi_PROJECTICON.ico + System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace) + .\$(Platform)\$(Config) + .\$(Platform)\$(Config) + false + false + false + false + false + 1031 + CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments= + ..\..;..\..\src;$(DCC_UnitSearchPath) + + + true + 1033 + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + $(BDS)\bin\default_app.manifest + CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName) + IndyIPClient;FireDACASADriver;FireDACSqliteDriver;bindcompfmx;FireDACDSDriver;DBXSqliteDriver;FireDACPgDriver;FireDACODBCDriver;RESTBackendComponents;emsclientfiredac;fmx;rtl;dbrtl;DbxClientDriver;IndySystem;FireDACCommon;bindcomp;inetdb;tethering;vclib;DBXInterBaseDriver;DataSnapClient;DataSnapServer;DataSnapCommon;DBXOdbcDriver;vclFireDAC;DataSnapProviderClient;xmlrtl;DataSnapNativeClient;DBXSybaseASEDriver;DbxCommonDriver;svnui;vclimg;ibxpress;IndyProtocols;dbxcds;DBXMySQLDriver;DatasnapConnectorsFreePascal;FireDACCommonDriver;MetropolisUILiveTile;bindengine;vclactnband;vcldb;bindcompdbx;soaprtl;vcldsnap;bindcompvcl;vclie;OmniThreadLibraryRuntimeXE7;fmxFireDAC;FireDACADSDriver;vcltouch;DBXDb2Driver;emsclient;CustomIPTransport;DBXOracleDriver;vclribbon;VCLRESTComponents;FireDACMSSQLDriver;FireDAC;VclSmp;dsnap;DBXInformixDriver;vcl;DataSnapConnectors;fmxase;DataSnapServerMidas;DBXMSSQLDriver;IndyIPCommon;IndyCore;dsnapcon;FireDACIBDriver;DBXFirebirdDriver;inet;IndyIPServer;DataSnapFireDAC;fmxobj;CloudService;FireDACDBXDriver;FireDACMySQLDriver;soapmidas;vclx;soapserver;inetdbxpress;svn;DBXSybaseASADriver;dsnapxml;FireDACOracleDriver;FireDACInfxDriver;FireDACDb2Driver;RESTComponents;fmxdae;FireDACMSAccDriver;dbexpress;DataSnapIndy10ServerTransport;adortl;$(DCC_UsePackage) + true + $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png + $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png + + + IndyIPClient;FireDACASADriver;FireDACSqliteDriver;bindcompfmx;FireDACDSDriver;DBXSqliteDriver;FireDACPgDriver;FireDACODBCDriver;RESTBackendComponents;emsclientfiredac;fmx;rtl;dbrtl;DbxClientDriver;IndySystem;FireDACCommon;bindcomp;inetdb;tethering;vclib;DBXInterBaseDriver;DataSnapClient;DataSnapServer;DataSnapCommon;DBXOdbcDriver;vclFireDAC;DataSnapProviderClient;xmlrtl;DataSnapNativeClient;DBXSybaseASEDriver;DbxCommonDriver;vclimg;ibxpress;IndyProtocols;dbxcds;DBXMySQLDriver;DatasnapConnectorsFreePascal;FireDACCommonDriver;MetropolisUILiveTile;bindengine;vclactnband;vcldb;bindcompdbx;soaprtl;vcldsnap;bindcompvcl;vclie;fmxFireDAC;FireDACADSDriver;vcltouch;DBXDb2Driver;emsclient;CustomIPTransport;DBXOracleDriver;vclribbon;VCLRESTComponents;FireDACMSSQLDriver;FireDAC;VclSmp;dsnap;DBXInformixDriver;vcl;DataSnapConnectors;fmxase;DataSnapServerMidas;DBXMSSQLDriver;IndyIPCommon;IndyCore;dsnapcon;FireDACIBDriver;DBXFirebirdDriver;inet;IndyIPServer;DataSnapFireDAC;fmxobj;CloudService;FireDACDBXDriver;FireDACMySQLDriver;soapmidas;vclx;soapserver;inetdbxpress;DBXSybaseASADriver;dsnapxml;FireDACOracleDriver;FireDACInfxDriver;FireDACDb2Driver;RESTComponents;fmxdae;FireDACMSAccDriver;dbexpress;DataSnapIndy10ServerTransport;adortl;$(DCC_UsePackage) + $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png + $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) + Debug + true + CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments= + 1033 + $(BDS)\bin\default_app.manifest + + + DEBUG;$(DCC_Define) + true + false + true + true + true + + + true + ..\..;$(DCC_UnitSearchPath) + 1033 + false + Debug + + + true + true + true + 1033 + + + false + RELEASE;$(DCC_Define) + 0 + 0 + + + true + true + + + + MainSource + + +
frmForVsForEach
+ dfm +
+ + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + +
+ + Delphi.Personality.12 + Application + + + + app_58_ForVsForEach.dpr + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1060 + 1250 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + Embarcadero C++Builder-Package für Office 2000-Server + Embarcadero C++Builder-Package für Office XP-Server + Microsoft Office 2000 Beispiele für gekapselte Komponenten für Automatisierungsserver + Microsoft Office XP Beispiele für gekapselte Komponenten für Automation Server + + + + + + + 1 + + + Contents\MacOS + 1 + + + Contents\MacOS + 0 + + + + + classes + 1 + + + + + library\lib\armeabi-v7a + 1 + + + + + library\lib\armeabi + 1 + + + + + library\lib\mips + 1 + + + + + library\lib\armeabi-v7a + 1 + + + + + res\drawable + 1 + + + + + res\values + 1 + + + + + res\drawable + 1 + + + + + res\drawable-xxhdpi + 1 + + + + + res\drawable-ldpi + 1 + + + + + res\drawable-mdpi + 1 + + + + + res\drawable-hdpi + 1 + + + + + res\drawable-xhdpi + 1 + + + + + res\drawable-small + 1 + + + + + res\drawable-normal + 1 + + + + + res\drawable-large + 1 + + + + + res\drawable-xlarge + 1 + + + + + 1 + + + Contents\MacOS + 1 + + + 0 + + + + + Contents\MacOS + 1 + .framework + + + 0 + + + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + Contents\MacOS + 1 + .dylib + + + 0 + .dll;.bpl + + + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + Contents\MacOS + 1 + .dylib + + + 0 + .bpl + + + + + 0 + + + 0 + + + 0 + + + 0 + + + Contents\Resources\StartUp\ + 0 + + + 0 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + + + 1 + + + 1 + + + + + ..\ + 1 + + + ..\ + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + ..\ + 1 + + + + + Contents + 1 + + + + + Contents\Resources + 1 + + + + + library\lib\armeabi-v7a + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + Contents\MacOS + 1 + + + 0 + + + + + 1 + + + 1 + + + + + Assets + 1 + + + Assets + 1 + + + + + Assets + 1 + + + Assets + 1 + + + + + + + + + + + + + True + True + + + 12 + + + + +
diff --git a/tests/58_ForVsForEach/test_58_ForVsForEach.pas b/tests/58_ForVsForEach/test_58_ForVsForEach.pas index c9c966bd..1568eae1 100644 --- a/tests/58_ForVsForEach/test_58_ForVsForEach.pas +++ b/tests/58_ForVsForEach/test_58_ForVsForEach.pas @@ -29,7 +29,8 @@ implementation {$R *.dfm} const - CLoopCount = 100000000; {100 million} +// CLoopCount = 100000000; {100 million} + CLoopCount = MAXINT - 1; procedure TfrmForVsForEach.btnTestClick(Sender: TObject); begin @@ -46,7 +47,10 @@ procedure TfrmForVsForEach.btnTestClick(Sender: TObject); Time('Parallel.For', procedure begin - Parallel.For(1, CLoopCount).Execute( + Parallel + .For(1, CLoopCount) + .NoMsgBlock + .Execute( procedure (idx: integer) begin end);