3
votes
Vote UpVote

Parallel.For

The Delphi Geek – Just thinking out loud: function TfrmParallelForDemo.ParaScan(node: TNode; value: integer): TNode;var nodeResult: TNode; nodeQueue : TOmniBlockingCollection;begin nodeResult := nil; nodeQueue := TOmniBlockingCollection.Create; try nodeQueue.Add(FRootNode); Parallel.ForEach(nodeQueue.GetEnumerator).Timeout(10*1000).Execute( procedure (const elem: TOmniValue) var iNode: integer; begin node := TNode(elem.AsPointer); if node.Value = value then begin nodeResult := node; nodeQueue.CompleteAdding; end else for iNode := 0 ...
Favorite? Off-Topic? gabr @ 2010-01-08 20:39

Statistics

Visits: 780
Votes: 3
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Charles Ardour
jamiei
Primoz Gabrijelcic
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

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