Skip to Main Content
Delphi High Performance
book

Delphi High Performance

by Primož Gabrijelčič
February 2018
Intermediate to advanced content levelIntermediate to advanced
336 pages
7h 52m
English
Packt Publishing
Content preview from Delphi High Performance

Stages

Let us now see how the stages are implemented. The first stage, FolderScanner, scans a folder and writes all found Pascal files to the output. Its implementation is shown as follows.

The stage method receives two parameters of type IOmniBlockingCollection, which represent its input and output communication channel, and an optional parameter that allows access to the task that runs the stage code (task: IOmniTask).

An IOmniBlockingCollection channel contains items of type TOmniValue, which is a fast variation of Delphi's Variant or TValue. This type can store any other Delphi data type inside.

A typical stage would run a for value in input loop to read all the data from the input. This for doesn't exit if there is no data on the input ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Delphi Cookbook

Delphi Cookbook

Daniele Teti

Publisher Resources

ISBN: 9781788625456Supplemental Content