Skip to content

Commit 4c0b9a2

Browse files
authored
Merge pull request #5837 from changeworld/patch-1
Fix typo: cancelation -> cancellation
2 parents 191da1d + 186f736 commit 4c0b9a2

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

docs/parallel/concrt/cancellation-in-the-ppl.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ This example produces the following output.
215215
Caught 50
216216
```
217217

218-
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.
218+
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.
219219

220220
[!code-cpp[concrt-task-tree#8](../../parallel/concrt/codesnippet/cpp/cancellation-in-the-ppl_14.cpp)]
221221

docs/parallel/concrt/codesnippet/CPP/cancellation-in-the-ppl_12.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// To enable cancelation, call parallel_for in a task group.
1+
// To enable cancellation, call parallel_for in a task group.
22
structured_task_group tg;
33

44
task_group_status status = tg.run_and_wait([&] {

docs/parallel/concrt/codesnippet/CPP/cancellation-in-the-ppl_14.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Create a Boolean flag to coordinate cancelation.
1+
// Create a Boolean flag to coordinate cancellation.
22
bool canceled = false;
33

44
parallel_for(0, 100, [&](int i) {

docs/parallel/concrt/codesnippet/CPP/cancellation-in-the-ppl_6.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
for (int i = 0; i < 1000; ++i)
2424
{
2525
// To reduce overhead, occasionally check for
26-
// cancelation.
26+
// cancellation.
2727
if ((i%100) == 0)
2828
{
2929
if (tg2.is_canceling())

docs/parallel/concrt/task-parallelism-concurrency-runtime.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ The runtime also provides an exception-handling model that enables you to throw
257257

258258
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.
259259

260-
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.
260+
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.
261261

262262
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.
263263

0 commit comments

Comments
 (0)