Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor ChannelStrategy/OperatorContext #248

Closed
Max-Meldrum opened this issue Aug 17, 2021 · 0 comments · Fixed by #250
Closed

Refactor ChannelStrategy/OperatorContext #248

Max-Meldrum opened this issue Aug 17, 2021 · 0 comments · Fixed by #250
Assignees
Labels
enhancement New feature or request

Comments

@Max-Meldrum
Copy link
Member

The current implementation passes along a reference of ComponentDefinition across multiple functions just so that a ChannelStrategy can use it for kompacts tell_serialised function.

Refactor ChannelStrategy to return an iterator of (Channel, ArconMessage) that can be dispatched from the Node/SourceNode itself. This way we also can handle potential buffer errors easier too.

The above change also relates to operators as we also pass a ComponentDefinition reference into the OperatorContext.

Rather than outputting events through ctx.output(event), make handle_element/handle_timeout return an element iterator.

// inside Operator trait
type ElementIterator: IntoIterator<Item = ArconElement<Self::OUT>> + 'static;

This change is also required for it to be possible to create an operator chain (#246).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant