diff --git a/docs/parallel/concrt/cancellation-in-the-ppl.md b/docs/parallel/concrt/cancellation-in-the-ppl.md index 3d97190376d..66e4150037a 100644 --- a/docs/parallel/concrt/cancellation-in-the-ppl.md +++ b/docs/parallel/concrt/cancellation-in-the-ppl.md @@ -215,7 +215,7 @@ This example produces the following output. Caught 50 ``` -The following example uses a Boolean flag to coordinate cancellation in a `parallel_for` loop. Every task runs because this example does not use the `cancel` method or exception handling to cancel the overall set of tasks. Therefore, this technique can have more computational overhead than a cancelation mechanism. +The following example uses a Boolean flag to coordinate cancellation in a `parallel_for` loop. Every task runs because this example does not use the `cancel` method or exception handling to cancel the overall set of tasks. Therefore, this technique can have more computational overhead than a cancellation mechanism. [!code-cpp[concrt-task-tree#8](../../parallel/concrt/codesnippet/cpp/cancellation-in-the-ppl_14.cpp)] diff --git a/docs/parallel/concrt/codesnippet/CPP/cancellation-in-the-ppl_12.cpp b/docs/parallel/concrt/codesnippet/CPP/cancellation-in-the-ppl_12.cpp index 54a60e82783..93413d211ca 100644 --- a/docs/parallel/concrt/codesnippet/CPP/cancellation-in-the-ppl_12.cpp +++ b/docs/parallel/concrt/codesnippet/CPP/cancellation-in-the-ppl_12.cpp @@ -1,4 +1,4 @@ - // To enable cancelation, call parallel_for in a task group. + // To enable cancellation, call parallel_for in a task group. structured_task_group tg; task_group_status status = tg.run_and_wait([&] { diff --git a/docs/parallel/concrt/codesnippet/CPP/cancellation-in-the-ppl_14.cpp b/docs/parallel/concrt/codesnippet/CPP/cancellation-in-the-ppl_14.cpp index 501bef3171f..20dc01ea24a 100644 --- a/docs/parallel/concrt/codesnippet/CPP/cancellation-in-the-ppl_14.cpp +++ b/docs/parallel/concrt/codesnippet/CPP/cancellation-in-the-ppl_14.cpp @@ -1,4 +1,4 @@ - // Create a Boolean flag to coordinate cancelation. + // Create a Boolean flag to coordinate cancellation. bool canceled = false; parallel_for(0, 100, [&](int i) { diff --git a/docs/parallel/concrt/codesnippet/CPP/cancellation-in-the-ppl_6.cpp b/docs/parallel/concrt/codesnippet/CPP/cancellation-in-the-ppl_6.cpp index a2fd7307692..64bd96b60aa 100644 --- a/docs/parallel/concrt/codesnippet/CPP/cancellation-in-the-ppl_6.cpp +++ b/docs/parallel/concrt/codesnippet/CPP/cancellation-in-the-ppl_6.cpp @@ -23,7 +23,7 @@ for (int i = 0; i < 1000; ++i) { // To reduce overhead, occasionally check for - // cancelation. + // cancellation. if ((i%100) == 0) { if (tg2.is_canceling()) diff --git a/docs/parallel/concrt/task-parallelism-concurrency-runtime.md b/docs/parallel/concrt/task-parallelism-concurrency-runtime.md index 23e2ad45736..d6ab7f02cc6 100644 --- a/docs/parallel/concrt/task-parallelism-concurrency-runtime.md +++ b/docs/parallel/concrt/task-parallelism-concurrency-runtime.md @@ -257,7 +257,7 @@ The runtime also provides an exception-handling model that enables you to throw Although we recommend that you use `task_group` or `parallel_invoke` instead of the `structured_task_group` class, there are cases where you want to use `structured_task_group`, for example, when you write a parallel algorithm that performs a variable number of tasks or requires support for cancellation. This section explains the differences between the `task_group` and `structured_task_group` classes. -The `task_group` class is thread-safe. Therefore you can add tasks to a `task_group` object from multiple threads and wait on or cancel a `task_group` object from multiple threads. The construction and destruction of a `structured_task_group` object must occur in the same lexical scope. In addition, all operations on a `structured_task_group` object must occur on the same thread. The exception to this rule is the [concurrency::structured_task_group::cancel](reference/structured-task-group-class.md#cancel) and [concurrency::structured_task_group::is_canceling](reference/structured-task-group-class.md#is_canceling) methods. A child task can call these methods to cancel the parent task group or check for cancelation at any time. +The `task_group` class is thread-safe. Therefore you can add tasks to a `task_group` object from multiple threads and wait on or cancel a `task_group` object from multiple threads. The construction and destruction of a `structured_task_group` object must occur in the same lexical scope. In addition, all operations on a `structured_task_group` object must occur on the same thread. The exception to this rule is the [concurrency::structured_task_group::cancel](reference/structured-task-group-class.md#cancel) and [concurrency::structured_task_group::is_canceling](reference/structured-task-group-class.md#is_canceling) methods. A child task can call these methods to cancel the parent task group or check for cancellation at any time. You can run additional tasks on a `task_group` object after you call the [concurrency::task_group::wait](reference/task-group-class.md#wait) or [concurrency::task_group::run_and_wait](reference/task-group-class.md#run_and_wait) method. Conversely, if you run additional tasks on a `structured_task_group` object after you call the [concurrency::structured_task_group::wait](reference/structured-task-group-class.md#wait) or [concurrency::structured_task_group::run_and_wait](reference/structured-task-group-class.md#run_and_wait) methods, then the behavior is undefined.