oneTBB
oneTBB copied to clipboard
Making Edges between nodes belonging to different graphs
Hello,
How to make edges between nodes belonging to different graphs please? Say I have to graphs g1 and g2 and nodes n1(g1) and another node n2(g2) one referecing g1 and the other referening g2 with g1 != g2, is there a way to make an edge between n1(g1) and n2(g2)?
Thanks very much!
@Veronizlada, Typically, connecting the nodes that belongs to different graphs is not recommended. Consider this oneTBB Developer Guide topic for more information.
@kboyarinov, Thanks very much! Please, is it not recommended because of performance? Because at the end of the day I can connect the two graphs using a common queue and one node in graph1 can push and the other node from graph2 will pull. Please let me know if I really have to not use this even if I am careful.
@Veronizlada,
It is not recommended to make edges between the graph because it can be hard to understand the interaction between two graphs and correctly handle exceptions caused by the nodes bodies and which exact tasks should be completed before the g.wait_for_all() call can be finished.
If you would be able to share some more details on why is the connection of two different graphs is required, we may be can find the better solution for that.
@Veronizlada is this question still relevant for you? Could you please respond?
Closing it since no response.