- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am new to TBB flow graph and also new to this forum. Forgive me if I made mistakes.
In my flow graph, I have two parallel paths A and B that are joined at join_node c. Along path A there are a number of function nodes. Messages may flow pass and be processed. B has only one node b that represents a pre- task. This task can be carried out in parallel to tasks on path A, but must be finished before the join_node n can execute, which is why I choose a join_node for c.
My problem is that I want node b to repeat its msg multiple times so that join_node c can execute when multiple messages flow through path A. I don't really care what message node b can generate, as long as it is generated a given number times.
Is there anyway to achieve this in tbb flow graph.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How about a source_node that generates only one value, followed by a write_once_node?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have tried the same idea. I connect the write_once_node with join_node c. But I got only one execution of join_node c. I don't know what is the reason, but I suspect the write_once_node sent only one message.
Is there a special way to make join_node to work with a write_once_node?
My current solution is to use a multifunction_node with only one output node. But in this node I can use a for loop to use get<0>(out).try_put().
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That would have been my second suggestion, but I do find flow graph somewhat mysterious.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page