code format
This commit is contained in:
@@ -5,22 +5,22 @@
|
||||
* \~russian Пул потоков
|
||||
*/
|
||||
/*
|
||||
PIP - Platform Independent Primitives
|
||||
Thread pool loop
|
||||
Ivan Pelipenko peri4ko@yandex.ru
|
||||
PIP - Platform Independent Primitives
|
||||
Thread pool loop
|
||||
Ivan Pelipenko peri4ko@yandex.ru
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef PITHREADPOOLLOOP_H
|
||||
@@ -32,7 +32,6 @@ class PIThread;
|
||||
|
||||
class PIP_EXPORT PIThreadPoolLoop {
|
||||
public:
|
||||
|
||||
//! \~english
|
||||
//! Contructs thread pool with threads count "thread_cnt".
|
||||
//! If "thread_cnt" = -1 then system processors count used
|
||||
@@ -43,8 +42,10 @@ public:
|
||||
|
||||
virtual ~PIThreadPoolLoop();
|
||||
|
||||
//! \~english Set threads function to [lambda expression](https://en.cppreference.com/w/cpp/language/lambda) "f" with format [ ](int){ ... }
|
||||
//! \~russian Устанавливает функцию потоков на [лямбда-выражение](https://ru.cppreference.com/w/cpp/language/lambda) "f" в формате [ ](int){ ... }
|
||||
//! \~english Set threads function to [lambda expression](https://en.cppreference.com/w/cpp/language/lambda) "f" with format [ ](int){
|
||||
//! ... }
|
||||
//! \~russian Устанавливает функцию потоков на [лямбда-выражение](https://ru.cppreference.com/w/cpp/language/lambda) "f" в формате [
|
||||
//! ](int){ ... }
|
||||
void setFunction(std::function<void(int)> f);
|
||||
|
||||
//! \~english Wait for all threads stop
|
||||
@@ -80,10 +81,9 @@ public:
|
||||
void exec(int index_start, int index_count, std::function<void(int)> f);
|
||||
|
||||
private:
|
||||
PIVector<PIThread * > threads;
|
||||
PIVector<PIThread *> threads;
|
||||
std::function<void(int)> func;
|
||||
std::atomic_int counter;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user