Try fix Pipeline stuck

This commit is contained in:
Nikolai Kochetov 2020-12-27 14:25:43 +03:00
parent da6bfc2cfb
commit 1ebab1dc48
2 changed files with 7 additions and 1 deletions

View File

@ -78,11 +78,16 @@ IProcessor::Status DelayedPortsProcessor::prepare(const PortNumbers & updated_in
bool skip_delayed = (num_finished + num_delayed) < port_pairs.size();
bool need_data = false;
if (!updated_outputs.empty())
if (!are_inputs_initialized && !updated_outputs.empty())
{
/// Activate inputs with no output.
for (const auto & pair : port_pairs)
if (!pair.output_port)
pair.input_port->setNeeded();
are_inputs_initialized = true;
}
for (const auto & output_number : updated_outputs)
{
auto pair_num = output_to_pair[output_number];

View File

@ -32,6 +32,7 @@ private:
size_t num_finished = 0;
std::vector<size_t> output_to_pair;
bool are_inputs_initialized = false;
bool processPair(PortsPair & pair);
};