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
noflo assumes all control ports are populated before non-control ports when triggering process function #607
Comments
That's actually expected behaviour. In order to get all packets from the buffer you need to use |
Why would that be expected behavior? It only occurs in the case of control packets, and means your component has to be aware that there are control packets. What benefit does that have? |
There is no benefit, it's a design tradeoff. Firing patterns in FBP are not always easy. There might be a corner case like this, and components have to take it in consideration. |
I don't see what the design tradeoff is. Having a component randomly fail to process all messages because of a race condition certainly seems like a defect to me, not a tradeoff. |
The thing is, control ports are non-firing (by design). But indeed, I agree that there should be the exception that they probably should fire if there is unprocessed input in the other ports |
Mea culpa, I forgot that control ports in NoFlo don't fire. Then, indeed, it makes sense to do what @bergie suggested. |
With a component such as:
component.Inport.add("in", {
datatype: "all"
})
component.Inport.add("ctl", {
datatype: "object",
control: true,
required: true
})
If you receive more then one packet at "in" before you receive any packet at "ctl" then once a "ctl" packet is received the process method is only triggered once, leaving the "in" buffer with unprocessed packets.
The text was updated successfully, but these errors were encountered: