November 2019
Beginner to intermediate
674 pages
15h
English
When all tasks have finished execution, the ShowResult method is called. It tries to read the result of the computation from the pipeline's output channel by calling FPipeline.Output.TryTake. This function will return false if the pipeline was cancelled, so no result will be displayed in that case:
procedure TfrmPipeline.ShowResult;var value: TOmniValue; stat: TStatistics;begin if FPipeline.Output.TryTake(value) then begin stat := value.ToRecord<TStatistics>; ListBox1.Items.Add(Format( 'Files: %d, Lines: %d, Words: %d, Characters: %d', [stat.Files, stat.Lines, stat.Words, stat.Chars])); end; Cleanup;end;
At the end, ShowResult calls the Cleanup method, which destroys the pipeline interface by setting ...
Read now
Unlock full access