Skip to content

Commit 3d2d927

Browse files
Tsung-Wei HuangTsung-Wei Huang
authored andcommitted
updated readme.md
1 parent 2069530 commit 3d2d927

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,19 @@ Most applications are developed through the following three steps.
5858

5959
## Step 1: Create a Task
6060
To start a task dependency graph,
61-
create a taskflow object and specify the number of working threads in a shared thread pool
62-
to carry out tasks.
61+
create a taskflow object and specify the number of working threads.
6362
```cpp
6463
tf::Taskflow tf(std::max(1u, std::thread::hardware_concurrency()));
6564
```
6665
Create a task via the method `emplace` and get a pair of `Task` and `future`.
6766
```cpp
6867
auto [A, F] = tf.emplace([](){ std::cout << "Task A\n"; return 1; });
6968
```
70-
Or create a task via the method `silent_emplace`, if you don't need a `future` to retrieve the result.
69+
If you don't need a `future` to retrieve the result, use the method `silent_emplace` instead.
7170
```cpp
7271
auto A = tf.silent_emplace([](){ std::cout << "Task A\n"; });
7372
```
74-
Both methods implement variadic templates and can take arbitrary numbers of arguments to create multiple tasks at one time.
73+
Both methods implement variadic templates and can take arbitrary numbers of callables to create multiple tasks at one time.
7574
```cpp
7675
auto [A, B, C, D] = tf.silent_emplace(
7776
[] () { std::cout << "Task A\n"; },
@@ -84,7 +83,7 @@ auto [A, B, C, D] = tf.silent_emplace(
8483
## Step 2: Define Task Dependencies
8584
Once tasks are created in the pool, you need to specify task dependencies in a
8685
[Directed Acyclic Graph (DAG)](https://en.wikipedia.org/wiki/Directed_acyclic_graph) fashion.
87-
The class `Task` supports different methods for you to describe task dependencies.
86+
The handle `Task` supports different methods for you to describe task dependencies.
8887

8988
**Precede**: Adding a preceding link forces one task to run ahead of one another.
9089
```cpp

0 commit comments

Comments
 (0)