I need to accumulate 2 incoming messages before passing on a single message. The documentation of the continue_node mentions the threshold parameter T but is not clear on whether it always equals the number of connected predecessors. In my case there is only one predecessor but I'd like T = 2. Is this possible?
continue_node<continue_msg> count2(g, 1, MessageForwarder());
make_edge(some_message_generator, count2);
T==2; // hopefully true?
Where the MessageForwarder is a simple message forwarder body (unless there is a predefined one?),
class MessageForwarder {
continue_msg operator()(continue_msg /*m*/) {
return continue_msg();
}
};
I'd be glad to hear any advice on this or possibly another way of making a simple "counting node".