Skip to content

Commit

Permalink
Closes #83 (again)
Browse files Browse the repository at this point in the history
The previous commit was missing changes to AbstractSlice.java
  • Loading branch information
sylvainhalle committed Oct 10, 2024
1 parent 26d9762 commit 787e12c
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions Core/src/ca/uqac/lif/cep/tmf/AbstractSlice.java
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,32 @@ protected void copyInto(AbstractSlice as, boolean with_state)
as.m_sliceIndices.put(e.getKey(), list);
}
}

@Override
protected boolean onEndOfTrace(Queue<Object[]> outputs) throws ProcessorException
{
boolean new_events = false;
// Send the message to all slices
for (Map.Entry<Object, Processor> e : m_slices.entrySet())
{
Processor p = e.getValue();
Pushable pp = p.getPushableInput(0);
QueueSink sink = m_sinks.get(e.getKey());
int size_before = sink.getQueue().size();
pp.notifyEndOfTrace();
int size_after = sink.getQueue().size();
if (size_after > size_before)
{
new_events = true;
handleNewSliceValue(e.getKey(), sink.getQueue().peek(), outputs);
}
}
if (new_events)
{
return produceReturn(outputs);
}
return false;
}

/**
* Dummy object telling the slicer that an event must be sent to all slices
Expand Down

0 comments on commit 787e12c

Please sign in to comment.