Feature request: optional_node
Hello, my flow graph usage requires some nodes to conditionally send messages to their successors.
Currently I achieve this by using a single-output multifunction_node and conditionally sending to the output port.
I think this could more elegantly be handled with a new node type. Its usage would be identical to function_node with one difference: the return type for body would be an optional<output_type>.
If the body returns nullopt then a message is not sent to successors.
Also want this feature. Is there any progress about this?
I've run into needing this feature as well, and am planning on using the same solution that @Lawrencemm proposed above in the meantime. If I were to create a PR that implemented this (I'd probably call it something like flow::filter_node<Input, Output>), would the oneTBB developers be interested in adopting it?