Refactor onSignal()
Current Situation:
A producer in RunnableProducerStage
is signaled via
this.stage.onSignal(new InitializingSignal(), null);
calling
void onSignal(ISignal signal, InputPort<?> inputPort);
- Since a producer does not have any input port,
null
needs to be passed. This could be confusing. - Moreover, a producer never receives a signal from an input port, but directly from its environment. This could be confusing for stage developers.
Solution:
Perhaps, a producer should have another method triggerSignal
or sendSignal
.
Furthermore, onSignal
should be removed or refactored.
It should not contain an input port as parameter.