Issue with Pipeline demo 41 compile
Closed this issue · 2 comments
The demo application Pipeline example with the .Output(output).NoWait
option won't compile.
output := TOmniBlockingCollection.Create;
Parallel
.Pipeline
//.Input not set - first stage will have no input
.Stage(
procedure (const input, output: IOmniBlockingCollection)
var
i: integer;
begin
for i := 1 to 1000000 do
output.Add(i);
// .CompleteAdding is called automatically
end
)
.Stage(StageMult2)
.Stages([StageMinus3, StageMod5])
.NumTasks(2) // each stage from previous line will execute in two tasks
.Output(output)
.NoWait
.Run;
Compiler in Delphi 10.4 highlights issues at .Output(output).NoWait
. This seems to be from an older version I'm guessing.
Where did you find this demo? AFAIK this is not part of the current OTL repository.
I pulled the repo from https://github.com/gabr42/OmniThreadLibrary.git.
However, there looks to be a problem with my clone. When I compare my version of test_41_Pipeline.pas to that in the repository, it looks completely different than the one online.
I also pulled down a new clone and this time, it has the file that matches the repository. I wonder what happen. I used Tortoise Git like I usually do.
Sorry for the false alarm. Please close this request.