Skip to content

Commit 43d7486

Browse files
author
Colin Robertson
committed
Example example.
1 parent f5f6fef commit 43d7486

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

docs/parallel/concrt/walkthrough-adapting-existing-code-to-use-lightweight-tasks.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,12 @@ Before you start this walkthrough, read the topic [Task Scheduler](../../paralle
1616

1717
## Example
1818

19-
### Description
20-
2119
The following example illustrates typical usage of the Windows API to create and execute a thread. This example uses the [CreateThread](/windows/win32/api/processthreadsapi/nf-processthreadsapi-createthread) function to call the `MyThreadFunction` on a separate thread.
2220

23-
### Code
21+
### Initial code
2422

2523
[!code-cpp[concrt-windows-threads#1](../../parallel/concrt/codesnippet/cpp/walkthrough-adapting-existing-code-to-use-lightweight-tasks_1.cpp)]
2624

27-
### Comments
28-
2925
This example produces the following output.
3026

3127
```Output
@@ -72,18 +68,12 @@ The following steps show how to adapt the code example to use the Concurrency Ru
7268

7369
1. Remove the `return` statement from `MyThreadFunction`.
7470

75-
## Example
76-
77-
### Description
71+
### Completed code
7872

7973
The following completed example shows code that uses a lightweight task to call the `MyThreadFunction` function.
8074

81-
### Code
82-
8375
[!code-cpp[concrt-migration-lwt#1](../../parallel/concrt/codesnippet/cpp/walkthrough-adapting-existing-code-to-use-lightweight-tasks_10.cpp)]
8476

85-
### Comments
86-
8777
## See also
8878

8979
[Task Scheduler](../../parallel/concrt/task-scheduler-concurrency-runtime.md)<br/>

0 commit comments

Comments
 (0)