I have a simple implementation of pipeline (IOmniPipeline) but the 2nd stage that is added is not being executed.
Code follows:
var
OmniPipeline: IOmniPipeline;
begin
OmniPipeline := Parallel.Pipeline;
OmniPipeline.Stage(DoDataTransfer_A);
OmniPipeline.Stage(DoDataTransfer_B); // <---- This stage is not being executed!
OmniPipeline.OnStop(DataTransferCompleteEvent).Run;
OmniPipeline.input.Add(nil);
OmniPipeline.input.CompleteAdding;
procedure DoDataTransfer_A(const input: TOmniValue; var output: TOmniValue);
begin
//some code here
end;
procedure DoDataTransfer_B(const input: TOmniValue; var output: TOmniValue);
begin
//some code here
end;
I expect that the procedure DoDataTransfer_B
should execute as soon as DoDataTransfer_A
is completed (The implementations of these methods are simple and I have not included them in the question).
I would really appreciate it if you could point out what is wrong and how this can be resolved.