Update README.md

This commit is contained in:
green-caterpillar 2014-09-16 23:16:32 +04:00
parent 179a05210e
commit 5d95466ea8

View File

@ -11,16 +11,15 @@ cpputil
#### threadpool
Создадим пул с 4 потоками
```C++
``` cpp
threadpool pool(4);
```
Добавим задачу в виде глобальной функции с параметрами
```C++
```cpp
int add(int x, int y)
{
return x + y;
}
pool.add_task(&add, 1, 2);
```
или член класса