1.. _Graph_Object:
2
3Flow Graph Basics: Graph Object
4===============================
5
6
7Conceptually a flow graph is a collection of nodes and edges. Each node
8belongs to exactly one graph and edges are made only between nodes in
9the same graph. In the flow graph interface, a graph object represents
10this collection of nodes and edges, and is used for invoking whole graph
11operations such as waiting for all tasks related to the graph to
12complete, resetting the state of all nodes in the graph, and canceling
13the execution of all nodes in the graph.
14
15
16The code below creates a graph object and then waits for all tasks
17spawned by the graph to complete. The call to ``wait_for_all`` in this
18example returns immediately since this is a trivial graph with no nodes
19or edges, and therefore no tasks are spawned.
20
21
22::
23
24
25   graph g;
26   g.wait_for_all();
27
28