Vote UpVote

Incrementing Progress Bar from a ForEach Loop

The Delphi Geek – A deceptively simple question – how do you update a progress bar from a ForEach loop – popped up on the Google+ OmniThreadLibrary community. The implementation turned out to be quite tricky so I created an example (55_ForEachProgress) which is now part of the OmniThreadLibrary SVN repository. The starting point was a simple Parallel.ForEach loop which I further simplified in the demo. Parallel .ForEach(1, CNumLoop) .Execute( procedure (const task: IOmniTask; const i: integer) begin // do some work Sleep(1); // update the progress bar - how? end );We cannot ...
Favorite? Off-Topic? gabr @ 2014-07-10 09:47


Visits: 1154
Votes: 2
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Jeroen Pluimers
Paul Thornton
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News


Please login or register to use this functionality.
(click on this box to dismiss)