1.. _cancelling_nested_parallelism:
2
3Canceling Nested Parallelism
4============================
5
6
7Nested parallelism is canceled if the inner context is bound to the
8outer context; otherwise it is not.
9
10
11If the execution of a flow graph is canceled, either explicitly or due
12to an exception, any tasks started by parallel algorithms or flow graphs
13nested within the nodes of the canceled flow graph may or may not be
14canceled.
15
16
17As with all of the library's nested parallelism, you can control
18cancellation relationships by use of explicit task_group_context
19objects. If you do not provide an explicit task_group_context to a flow
20graph, it is created with an isolated context by default.
21
22